function MakeFodder(src, width, height) {
    src = src.replace(" ", "");
    var TEMP_IMAGE = '<img src="$src$" height="$height$" width="$width$" border="0" />';
    var TEMP_FLASH = '';
    TEMP_FLASH += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
    TEMP_FLASH += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ';
    TEMP_FLASH += ' height="$height$" width="$width$">';
    TEMP_FLASH += '<param name="movie" value="$src$" />';
    TEMP_FLASH += '<param name="salign" value="TL">';
    TEMP_FLASH += '<param name="wmode" value="Transparent">';
    TEMP_FLASH += '<param name="wmode" value="opaque">';
    TEMP_FLASH += '<param name="quality" value="high">';
    TEMP_FLASH += '<embed src="$src$" quality="high" width="$width$" height="$height$" ';
    TEMP_FLASH += ' wmode="opaque" TYPE="application/x-shockwave-flash" ';
    TEMP_FLASH += ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
    TEMP_FLASH += '</embed>';
    TEMP_FLASH += '</object>';
    return (/\.swf$/gi.test(src) == true ? TEMP_FLASH: TEMP_IMAGE).replace(/\$src\$/gi, src).replace(/\$width\$/gi, width).replace(/\$height\$/gi, height);
}

function MakeContent(strImageUrl, strImageName, iWidth, iHeight, strClickUrl) {
    var TEMP_LINK = '<a href="$click_url$" target="_blank">$str_fodder$</a>';
    var TEMP_COVER = '';
    TEMP_COVER += '<div onClick="javascript:window.open(\'$click_url$\');" style="width:$width$px; height:$height$px;';
    TEMP_COVER += 'cursor:pointer; background-color:#000000; z-index:9999;';
    TEMP_COVER += 'filter:Alpha(Opacity=0); opacity:0.0; MozOpacity:0.0; KhtmlOpacity:0.0;position:absolute;">';
    TEMP_COVER += '</div>';
    TEMP_COVER += '$str_fodder$';
    var src = strImageName || strImageUrl;
    var width = parseInt(iWidth);
    var height = parseInt(iHeight);
    var click_url = strClickUrl || "http://www.zjjxp.com/";
    var str_fodder = MakeFodder(src, width, height);
    if (/\.swf$/gi.test(src) == false) {
        return TEMP_LINK.replace(/\$str_fodder\$/gi, str_fodder).replace(/\$click_url\$/gi, click_url);
    }
    return TEMP_COVER.replace(/\$width\$/gi, width).replace(/\$height\$/gi, height).replace(/\$click_url\$/gi, click_url).replace(/\$str_fodder\$/gi, str_fodder);
}

function ShowContent(strImageUrl, strImageName, iWidth, iHeight, strClickUrl) {
    document.write(MakeContent(strImageUrl, strImageName, iWidth, iHeight, strClickUrl));
}