<style type="text/css">
/*<![CDATA[*/
.nothere {
     visibility:hidden;
 }
.there {
     visibility:visible;
 }

/*//]]>*/
</style>

<script type="text/javascript">
//<![CDATA[
onload=function() {
     document.getElementById('newsload').className='there';
 }
//]]>
</script>

<div id="floatright" style="width:295px; float:right;">

                        	
							<div class="rightadd" style="height:250px;background-image:none;border:none;">
							<img src="images/sideadd1.PNG" alt="coalbazaar,com" title="welcome to coalbazaar.com"/>
							</div>

                            <div class="righthotoffor">
														
								<h2>Hot Offers</h2>
									<marquee id="newsload" class="nothere" onMouseOver="this.scrollAmount=0" onMouseOut="this.scrollAmount=2" scrollamount="2" direction="up" loop="true" width="100%">
								<?php
									$obj = new DBClass();
									$sql = "SELECT * FROM ".TBL_LISTING." WHERE status = '0' AND popular = '1' order by id DESC Limit 0,5";
									$rs = $obj->executeQry($sql,$link);
									while($row = $obj->fetchrow()) { 
									
									$obj4 = new DBClass();
									$sql4 = "SELECT * FROM ".TBL_DIRECTORY." WHERE memberID = ".$row['memberID'];
									$rs4 = $obj4->executeQry($sql4,$link);
									$row4 = $obj4->fetchrow();
								?>
					    <div class="hotoffoer">
							
							<table class="coal" width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
											<td colspan="2" class="form_head" style="padding-left:5px"><?php echo $row4['organisation_name'];?></td>
									</tr>
									<tr>
											<td width="40%" class="contain"><b>Commodity</b></td>
											<td width="60%" class="contain"><?php echo $row['commodity'] ?></td>
									</tr>
									<tr>
											<td class="contain"><b>Origin</b></td>
											<td class="contain"><?php echo $row['origin'] ?></td>
									</tr>
									<tr>
											<td class="contain"><b>Location</b></td>
											<td class="contain"><?php if($row['commodity'] == 'Coal') { echo ($row['origin']=='Indian')?$row['area'].' ('.$row['mines_name'].')':$row['port']; } else { echo ($row['origin']=='Indian')?$row['noncoal_state']:$row['noncoal_state'].' ('.$row['noncoal_port'].')'; }?></td>
									</tr>
									<tr>
											<td class="contain"><b>Sub Location</b></td>
											<td class="contain"><?php if($row['commodity'] == 'Coal') {  if($row['origin']=='Indian') { echo $row['mines_name']; } } else { echo ($row['origin']=='Indian')?$row['noncoal_district']:$row['noncoal_district']; }?></td>
									</tr>
									<tr>
											<td class="contain"><b>GCV</b></td>
											<td class="contain"><?php echo $row['actual_gcv'] ?></td>
									</tr>
									<tr>
											<td colspan="2" align="right" style="padding-right:5px;"><a href="hot.php">More Details</a></td>
									</tr>
							</table>
						</div>
								<?php 	} ?>	
						</marquee>	
					</div>
							
			<br />
						<div class="rightadd">
							<img src="images/rightadd2.PNG"  height="155" alt="Side Add"/> 
				<div style="clear:both;"></div>
                        </div>
                 </div>           