﻿function BrowseIcon(ele) {
    var ifUpload;
    var confirmUpload;

    ifUpload = iframeUpload.document.uploadForm;
    ifUpload.fileUpload.click();
    //        confirmUpload = confirm ("You are about to upload the file " + ifUpload.myFile.value + " to the server. Do you agree to Upload?");
    //        if (confirmUpload)
    //        {
    if (ifUpload.fileUpload.value == "") {
        alert("请选择要上传的文件！");
    } else {

        //ifUpload.hidTypeId.value = TypeValue;
        //ifUpload.hidPrimaryId.value = document.getElementById("uploadattachment1$hidPrimaryId").value;
        //ifUpload.hidAttachmentModule.value = document.getElementById("uploadattachment1$hidAttachmentModule").value;
        //ifUpload.hidAttachmentName.value = document.getElementById("uploadattachment1$txtAttachmentName").value;

        ifUpload.btnSubmit.click();
    }
    //        }
    //ele.Enabled=false;
    return false;
}

function BrowseWallpaper(ele) {
    var ifUpload;
    var confirmUpload;

    ifUpload = iframeUpload.document.uploadForm;
    ifUpload.fileUpload.click();
    //        confirmUpload = confirm ("You are about to upload the file " + ifUpload.myFile.value + " to the server. Do you agree to Upload?");
    //        if (confirmUpload)
    //        {
    if (ifUpload.fileUpload.value == "") {
        alert("请选择要上传的文件！");
    } else {

        //ifUpload.hidTypeId.value = TypeValue;
        //ifUpload.hidPrimaryId.value = document.getElementById("uploadattachment1$hidPrimaryId").value;
        //ifUpload.hidAttachmentModule.value = document.getElementById("uploadattachment1$hidAttachmentModule").value;
        //ifUpload.hidAttachmentName.value = document.getElementById("uploadattachment1$txtAttachmentName").value;

        ifUpload.btnSubmit.click();
    }
    //        }
    //ele.Enabled=false;
    return false;
}

function getrediolistvalue(elename) {
    var v=0;
    var rbltable = document.getElementById(elename);
    var rbs = rbltable.getElementsByTagName("INPUT");

    for (var i = 0; i < rbs.length; i++) {
        if (rbs[i].checked) {
            v = rbs[i].value;
        }
    }
    return v;
}