
<?php
$product=$this->getProduct();
if(Mage::getModel('eav/entity_attribute_source_table')->setAttribute(Mage::getModel('eav/entity_attribute')->load(Mage::getModel('eav/entity_attribute')->getIdByCode('catalog_product', Mage::getStoreConfig('manufacturer/general/attribute_code'))))->getOptionText($product->getData('manufacturer'))):
    $manufacturers=Mage::getModel('manufacturer/manufacturer')->getCollection()->addFieldToFilter('manufacturer_name',$product->getData('manufacturer'));
    foreach($manufacturers as $manufacturer){
        $status=$manufacturer->getStatus();    
        if($status==1){
?>
        <div class="manufacturer-img-box">		
	        <a href="<?php echo $manufacturer->getUrl();//echo $this->getBaseUrl()."catalogsearch/advanced/result/?manufacturer[]=".$manufacturer->getManufacturerName() ?>">
			<?php echo $this->getLayout()->createBlock('core/template')->setmanufacturerimage($manufacturer->getFilename())->setTemplate('manufacturer/manufacturer_resize.phtml')->toHtml(); ?>
			</a>
        </div>
<?php } 
} 
endif;
?>