﻿function InsFlashBanner(filepath, width, height, addBreak) {
    //debugger;
    var html = "<div style='text-align:center; margin-left:auto; margin-right:auto; margin-bottom:#break#px; width:#width#px;'>" +
                "<OBJECT codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'" +
								"WIDTH='#width#px' HEIGHT='#height#px' id='OBJECT1' ALIGN='middle' alt='' title=''>" + 
								"<PARAM NAME='movie' VALUE='#fileUrl#'>" +
								"<PARAM NAME='quality' VALUE=''>" +
								"<param name='wmode' value='transparent'>" +
								"<EMBED src='#fileUrl#' quality='' bgcolor=''  WIDTH='#width#px' HEIGHT='#height#px' NAME='menu' ALIGN='middle' alt='' title='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>" +
								"</EMBED>" +
						"</OBJECT></div>";
    html = html.replace("#break#", addBreak ? "24" : "0");											
    html = html.replace("#fileUrl#", filepath).replace("#width#", width).replace("#height#", height);
    html = html.replace("#fileUrl#", filepath).replace("#width#", width).replace("#height#", height);
    html = html.replace("#fileUrl#", filepath).replace("#width#", width).replace("#height#", height);
    document.write(html);
}

function InsImgBannerWidth(imgUrl, href, width, addBreak) {
    var html = "<div style='text-align:center; margin-left:auto; margin-right:auto; margin-bottom:#break#px; width:{2}px;'><a href='{1}' target='_blank'><img src='{0}' width='{2}' alt='' border='0' /></a></div>".replace('{0}', imgUrl).replace('{1}', href).replace('{2}', width).replace('{2}', width);
    html = html.replace("#break#", addBreak ? "24" : "0");
    document.write(html);
    //if (addBreak) document.write("<br />");
}

function InsImgBanner(imgUrl, href) {
    document.write("<div style='text-align:center;'><a href='{1}' target='_blank'><img src='/Img/Banners/{0}' alt='' border='0' /></a></div><br />".replace('{0}', imgUrl).replace('{1}', href));
}





