﻿function showSwf(strpath, intwidth, intheight, vars, scaleMode, objCon) {
    var swfHTML = "";
    scale = "showall";
    if (scaleMode == "1") scale = "Exactfit";
    swfHTML = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0' height='" + intheight + "' width='" + intwidth + "'  id='picControll' align='middle'>";
    swfHTML += "<param name='AllowScriptAccess' value='always' /><param name='wmode' value='transparent' /><param name='scale' value='" + scale + "' /><param name='movie' value='" + strpath + ".swf' /><param name='movie' value='" + strpath + ".swf' /><param name='FlashVars' value='" + vars + "' /><param name='allowfullscreen' value='true' />";
    swfHTML += "<embed AllowScriptAccess='always' src='" + strpath + ".swf' FlashVars='" + vars + "' allowfullscreen='true' scale='" + scale + "' wmode='transparent' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' height='" + intheight + "' width='" + intwidth + "' ></embed></object>";

    if (objCon != null) {
        var obj = document.getElementById(objCon);
        if (obj != null) {
            document.getElementById(objCon).innerHTML = swfHTML;
        }
    } else {
        document.write(swfHTML);
    }

}
//全选
function SelAllCheck(tabID) {
    var Tab = document.getElementById(tabID);
    if (Tab == null)
        return;
    var chks = Tab.getElementsByTagName("input");
    if (chks == null)
        return;

    for (i = 0; i < chks.length; i++) {
        if (chks[i].type == "checkbox") {
            chks[i].checked = true;
        }
    }
}
//反选
function SelAllNotCheck(tabID) {
    var Tab = document.getElementById(tabID);
    if (Tab == null)
        return;
    var chks = Tab.getElementsByTagName("input");
    if (chks == null)
        return;

    for (i = 0; i < chks.length; i++) {
        if (chks[i].type == "checkbox") {

            chks[i].checked = false;
        }
    }
}
