<?php function mobile_post_advert(){
	if(get_option("post_ad_buysell_id") != ""): ?>
		<div class="post-advert"><?php echo stripslashes(get_option("post_ad_buysell_id")); ?></div>
	<?php elseif(get_option("post_ad_image") != "") : ?>
        <a href="<?php echo get_option("post_ad_link"); ?>" target="_blank" rel="nofollow" class="post-advert">
            <img src="<?php echo get_option("post_ad_image"); ?>" alt="<?php echo get_option("post_ad_title"); ?>" />
        </a>
	<?php endif;
}

function mobile_header_advert(){
	if(get_option("header_ad_buysell_id") != ""): ?>
		<div class="post-advert"><?php echo stripslashes(get_option("header_ad_buysell_id")); ?></div>
	<?php elseif(get_option("header_ad_image") != "") : ?>
        <a href="<?php echo get_option("header_ad_link"); ?>" target="_blank" rel="nofollow" class="post-advert">
            <img src="<?php echo get_option("header_ad_image"); ?>" alt="<?php echo get_option("header_ad_title"); ?>" />
        </a>
	<?php endif;
}

function mobile_footer_advert(){
	if(get_option("footer_ad_buysell_id") != ""): ?>
		<div class="post-advert"><?php echo stripslashes(get_option("footer_ad_buysell_id")); ?></div>
	<?php elseif(get_option("footer_ad_image") != "") : ?>
        <a href="<?php echo get_option("footer_ad_link"); ?>" target="_blank" rel="nofollow" class="post-advert">
            <img src="<?php echo get_option("footer_ad_image"); ?>" alt="<?php echo get_option("footer_ad_title"); ?>" />
        </a>
	<?php endif;
}?>