﻿
function PictureC_OutputFlash(ctrlName, contentName, picSrc, picLink, toolTip) {

    var picTd = document.getElementById(ctrlName);
    var docCtnt = document.getElementById(contentName);
    if (docCtnt == null) {
        docCtnt = document.getElementById("content0");
    }
    var width = parseInt(docCtnt.clientWidth);
    var focus_width = width; //* 0.01 * 950;
    var clickEvent = "";
    if (picLink == "javascript:void(0);") {
        clickEvent = "return false;";
    } else {
        clickEvent = "window.open('" + picLink + "');return false;";
    }

    // picTd.innerHTML = "<a onclick='" + clickEvent + "' href='" + picLink + "' title='点击图片转到 " + toolTip + "' target='_blank'> " + " <div id=\"div11\" style=\"height: 133px; overflow: auto\" class=\"rollstyle article\"> <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"  width=\"713\" height=\"133\"><param name=\"wmode\" value=\"opaque\" /><param name=\"movie\" value=\"" + picSrc + "\" /><param name=\"quality\" value=\"high\" /><embed src=\"" + picSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  type=\"application/x-shockwave-flash\" width=\"713\" height=\"133\"></embed></object></div>" + "</a>";
    picTd.innerHTML = " <div id=\"div11\" onclick=\"" + clickEvent + "\" style=\"  overflow: auto; width:100%; align:center\" class=\"rollstyle article\"> <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"  width=\"" + focus_width + "\" height=\"130\" onclick=\"" + clickEvent + "\"><param name=\"wmode\" value=\"opaque\" /><param name=\"movie\" value=\"" + picSrc + "\" /><param name=\"quality\" value=\"high\" /><embed src=\"" + picSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  type=\"application/x-shockwave-flash\" width=\"" + focus_width + "\" height=\"130\"></embed></object></div>";

}
function PictureC_OutputFlashWidthHeight(ctrlName, contentName, picSrc, picLink, toolTip, p_width, p_height) {

    var picTd = document.getElementById(ctrlName);
    var docCtnt = document.getElementById(contentName);
    if (docCtnt == null) {
        docCtnt = document.getElementById("content0");
    }
    var width = parseInt(docCtnt.clientWidth);
    var height = 130;
    if (p_width != null) {
        width = p_width;
    }
    if (p_height != null) {
        height = p_height;
    }
    var focus_width = width; //* 0.01 * 950;
    var clickEvent = "";
    if (picLink == "javascript:void(0);") {
        clickEvent = "return false;";
    } else {
        clickEvent = "window.open('" + picLink + "');return false;";
    }

    // picTd.innerHTML = "<a onclick='" + clickEvent + "' href='" + picLink + "' title='点击图片转到 " + toolTip + "' target='_blank'> " + " <div id=\"div11\" style=\"height: 133px; overflow: auto\" class=\"rollstyle article\"> <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"  width=\"713\" height=\"133\"><param name=\"wmode\" value=\"opaque\" /><param name=\"movie\" value=\"" + picSrc + "\" /><param name=\"quality\" value=\"high\" /><embed src=\"" + picSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  type=\"application/x-shockwave-flash\" width=\"713\" height=\"133\"></embed></object></div>" + "</a>";
    picTd.innerHTML = " <div id=\"div11\" onclick=\"" + clickEvent + "\" style=\"  overflow: auto; width:100%; align:center\" class=\"rollstyle article\"> <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"  width=\"" + focus_width + "\" height=\"" + height + "\" onclick=\"" + clickEvent + "\"><param name=\"wmode\" value=\"opaque\" /><param name=\"movie\" value=\"" + picSrc + "\" /><param name=\"quality\" value=\"high\" /><embed src=\"" + picSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  type=\"application/x-shockwave-flash\" width=\"" + focus_width + "\" height=\"" + height + "\"></embed></object></div>";

}
function PictureC_OutputPic(ctrlName, contentName, picSrc, picLink, toolTip) {
    var picTd = document.getElementById(ctrlName);
    var docCtnt = document.getElementById(contentName);
    if (docCtnt == null) {
        docCtnt = document.getElementById("content0");
    }

    var width = parseInt(docCtnt.style.width);
    var focus_width = width * 0.01 * 950;
    var clickEvent = "";
    if (picLink == "javascript:void(0);") {
        clickEvent = "return false;";
    }

    picTd.innerHTML = "<a onclick='" + clickEvent + "' href='" + picLink + "' title='点击图片转到 " + toolTip + "' target='_blank'><img border='0' src='" + picSrc + "' style='width:" + focus_width + "px;' /></a>";
}
function PictureC_OutputPic2(ctrlName, contentName, picSrc, picLink, toolTip) {
    var picTd = document.getElementById(ctrlName);
    var docCtnt = document.getElementById(contentName);
    if (docCtnt == null) {
        docCtnt = document.getElementById("content0");
    }

    var width = parseInt(docCtnt.style.width);
    var focus_width = width * 0.01 * 950;
    var clickEvent = "";
    if (picLink == "javascript:void(0);") {
        clickEvent = "return false;";
    }

    picTd.innerHTML = "<a onclick='" + clickEvent + "' href='" + picLink + "' title='点击图片转到 " + toolTip + "' target='_blank'><img border='0' src='" + picSrc + "' style='height:78px; width:" + focus_width + "px;' /></a>";
}
function PictureC_OutputPicWidthHeight(ctrlName, contentName, picSrc, picLink, toolTip, p_Width, p_Height) {
    var picTd = document.getElementById(ctrlName);
    var docCtnt = document.getElementById(contentName);
    if (docCtnt == null) {
        docCtnt = document.getElementById("content0");
    }

    var width = parseInt(docCtnt.style.width);
    var focus_width = width * 0.01 * 950;
    if (p_Width != null) {
        focus_width = p_Width;
    }
    var focus_height = 78;
    if (p_Height != null) {
        focus_height = p_Height;
    }
    var clickEvent = "";
    if (picLink == "javascript:void(0);") {
        clickEvent = "return false;";
    }

    picTd.innerHTML = "<a onclick='" + clickEvent + "' href='" + picLink + "' title='点击图片转到 " + toolTip + "' target='_blank'><img border='0' src='" + picSrc + "' style='height:" + focus_height + "px; width:" + focus_width + "px;' /></a>";
}
