function fieldViewAttr(fieldid, viewtype) {
alert('11')
jQuery("#field" + fieldid).attr("viewtype", viewtype);
var checkstr2 = jQuery("input[name='needcheck']").eq(0).val();
if(viewtype == "1") {
if(checkstr2.indexOf("field" + fieldid + ",") < 0) {
jQuery("input[name='needcheck']").eq(0).val(checkstr2 + "," + "field" + fieldid + ",");
}
var abv = jQuery("#field" + fieldid).val();
if(abv == "") {
jQuery("#field_" + fieldid + "span").html("<img/>");
jQuery("#field_" + fieldid + "span").find("img").eq(0).attr("src", "/images/BacoError_wev8.gif");
jQuery("#field" + fieldid + "span").html("<img/>");
jQuery("#field" + fieldid + "span").find("img").eq(0).attr("src", "/images/BacoError_wev8.gif");
}
} else {
jQuery("#field_" + fieldid + "span").html("");
jQuery("input[name='needcheck']").eq(0).val(checkstr2.replace("field" + fieldid + ",", ""));
if(jQuery("#field" + fieldid + "span").find("img").length > 0) {
jQuery("#field" + fieldid + "span").find("img").eq(0).remove();
}
}
}