(function(a){a().ajaxSend(function(b,c){c.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*")})})(jQuery);(function(a){a.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};a.fn.enable=function(){return this.each(function(){this.disabled=false})};a.fn.disable=function(){return this.each(function(){this.disabled=true})}})(jQuery);
(function(a){a.extend({fieldEvent:function(b,c){b=b[0]||b;var g="change";if(b.type=="radio"||b.type=="checkbox")g="click";else if(c&&b.type=="text"||b.type=="textarea")g="keyup";return g}});a.fn.extend({delayedObserver:function(b,c){var g=a(this);if(typeof window.delayedObserverStack=="undefined")window.delayedObserverStack=[];if(typeof window.delayedObserverCallback=="undefined")window.delayedObserverCallback=function(k){observed=window.delayedObserverStack[k];observed.timer&&clearTimeout(observed.timer);
observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal())},observed.delay*1E3);observed.oldVal=observed.obj.formVal()};window.delayedObserverStack.push({obj:g,timer:null,delay:b,oldVal:g.formVal(),callback:c});var l=window.delayedObserverStack.length-1;g[0].tagName=="FORM"?a(":input",g).each(function(){var k=a(this);k.bind(a.fieldEvent(k,b),function(){observed=window.delayedObserverStack[l];observed.obj.formVal()!=observed.obj.oldVal&&window.delayedObserverCallback(l)})}):
g.bind(a.fieldEvent(g,b),function(){observed=window.delayedObserverStack[l];observed.obj.formVal()!=observed.obj.oldVal&&window.delayedObserverCallback(l)})},formVal:function(){var b=this[0];if(b.tagName=="FORM")return this.serialize();return b.type=="checkbox"||self.type=="radio"?this.filter("input:checked").val()||"":this.val()}})})(jQuery);
(function(a){a.fn.extend({visualEffect:function(b){e=b.replace(/\_(.)/g,function(c,g){return g.toUpperCase()});return eval("$(this)."+e+"()")},appear:function(b,c){return this.fadeIn(b,c)},blindDown:function(b,c){return this.show("blind",{direction:"vertical"},b,c)},blindUp:function(b,c){return this.hide("blind",{direction:"vertical"},b,c)},blindRight:function(b,c){return this.show("blind",{direction:"horizontal"},b,c)},blindLeft:function(b,c){this.hide("blind",{direction:"horizontal"},b,c);return this},
dropOut:function(b,c){return this.hide("drop",{direction:"down"},b,c)},dropIn:function(b,c){return this.show("drop",{direction:"up"},b,c)},fade:function(b,c){return this.fadeOut(b,c)},fadeToggle:function(b,c){return this.animate({opacity:"toggle"},b,c)},fold:function(b,c){return this.hide("fold",{},b,c)},foldOut:function(b,c){return this.show("fold",{},b,c)},grow:function(b,c){return this.show("scale",{},b,c)},highlight:function(b,c){return this.show("highlight",{},b,c)},puff:function(b,c){return this.hide("puff",
{},b,c)},pulsate:function(b,c){return this.show("pulsate",{},b,c)},shake:function(b,c){return this.show("shake",{},b,c)},shrink:function(b,c){return this.hide("scale",{},b,c)},squish:function(b,c){return this.hide("scale",{origin:["top","left"]},b,c)},slideUp:function(b,c){return this.hide("slide",{direction:"up"},b,c)},slideDown:function(b,c){return this.show("slide",{direction:"up"},b,c)},switchOff:function(b,c){return this.hide("clip",{},b,c)},switchOn:function(b,c){return this.show("clip",{},
b,c)}})})(jQuery);$(function(){$("body").supersleight({shim:"/imgages/x.gif"})});function checkMerge(){var a=$(".mergebox input:checked").length;a>=2?$("#mergebutton").removeAttr("disabled"):$("#mergebutton").attr("disabled","disabled")}function checkLend(){var a=$(".lendbox input:checked").length;a>=1?$("#lendbutton").removeAttr("disabled"):$("#lendbutton").attr("disabled","disabled")}
function approveMerge(){var a=$(".mergebox input:checked").parents("li").children("strong"),b="Are you sure you wish to merge these records?\n";a.each(function(c){b+="\n * "+$(this).text()});return confirm(b)}
$(function(){$("#super-dangerous").submit(function(){var b="Are you sure you wish to permanently destroy all "+$("#total_entries").text()+" records ";b+="matching the query \u201c"+$("#destroy_found_set_q").val()+"\u201d?";b+="\n\nThis functionality is EXTREMELY dangerous, and there is NO undo available.";if(confirm(b)){$("#super-dangerous input[type='submit']").attr("value","Please wait\u2026").attr("disabled",true);return true}else return false});$("#super-dangerous input:disabled").removeAttr("disabled");
$("#thumbnail_form").submit(function(){$("input[type='submit']").attr({disabled:true,value:"Uploading\u2026"});return true});$("a.popmeup").click(function(){window.open($(this).attr("href"),"pbcorePopup","height=600,width=700/inv,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=1,toolbar=0");return false});function a(b){return function(){var c=$(this),g=c.parent().next("table.tracks");g.toggle(b);b&&g.highlight("slow");c.find(".showhidelabel").text(b?
"Hide":"Show");return false}}$("a.showtracks").toggle(a(true),a(false))});if(!String.prototype.capitalize)String.prototype.capitalize=function(){switch(this.length){case 0:return this;case 1:return this.toUpperCase();default:return this.slice(0,1).toUpperCase()+this.slice(1)}};String.prototype.addspaces=function(){return this.replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2")};function is_array(a){return Object.prototype.toString.apply(a)==="[object Array]"};var FormEditor=function(a){a(function(){if(FormEditor.objid=a("#edit_id").text())FormEditor.load()});var b,c,g,l,k=0,o=false;function f(d){this._name=d}f.prototype.toString=function(){return this._name};f.PLAIN=new f("plain");f.TEXTAREA=new f("textarea");f.VERBOSE=new f("verbose");f.SIMPLE=new f("simple");f.ONLY_TEXTAREA=new f("only texarea");function i(d,j){if(typeof console==="object")if(j!=="undefined"&&typeof console[j]==="function")console[j](d);else typeof console.log==="function"&&console.log(d)}
function p(d){var j=c[d.capitalize()],h={};switch(typeof j){case "string":return{source:function(n,m){n.term in h?m(h[n.term]):a.ajax({url:j,dataType:"json",data:n,success:function(q){h[n.term]=q;m(q)}})},minLength:2,delay:300};case "object":if(!is_array(j))return;return{source:j,minLength:0,delay:0}}}function r(d){a("<button>",{text:"\u00a0",type:"button",tabIndex:-1,title:"Show Options"}).insertAfter(d).button({icons:{primary:"ui-icon-triangle-1-s"},text:false}).removeClass("ui-corner-all").addClass("ui-corner-right ui-button-icon").click(function(){if(d.autocomplete("widget").is(":visible"))d.autocomplete("close");
else{d.autocomplete("search","");d.focus()}return false})}function s(d,j,h,n){var m=a("#"+d);b.find(j).each(function(q){n&&n(this)||h(j,m,this,q)});m.after(a("<p>").append(a("<a>",{href:"#",text:"Add another\u2026","class":"adder",click:function(){h(j,m);return false}})))}function C(d,j,h){var n=a("#"+d).addClass("pbcorechecks").attr("pbcore",j);d=c[h.capitalize()];var m,q=d.length;function u(w){var t=a("<span>",{css:{"white-space":"nowrap"}});++k;var v=a("<input>",{id:"box_"+k,name:h,type:"checkbox",
value:w});t.append(v).append(" ").append(a("<label>",{"for":"box_"+k,text:w}));n.append(t).append(" \u00a0\u00a0 ");return v}for(m=0;m<q;++m)u(d[m]);b.find(j+" "+h).each(function(){var w=a(this).text(),t=n.find("input[value='"+w+"']");if(t.length==0)t=u(w);t.attr("checked",true)})}function D(d){return a("<a>",{href:"#",text:"remove",click:function(){d.remove();return false}})}function x(d,j,h,n){return function(m,q,u){var w,t,v,E;h=h||f.PLAIN;var B=h==f.TEXTAREA||h==f.ONLY_TEXTAREA;m=a("<div>",{"class":"form_field_container "+
d,pbcore:m});if(d){++k;w=a("<label>",{text:d.capitalize().addspaces()+":","for":"input_"+k});var z={"class":"pbcorefield "+d,id:"input_"+k,name:d};if(B){z.cols=80;z.rows=5}else{z.size=30;z.type="text"}z[B?"text":"value"]=a(u).find(d).text();t=a(B?"<textarea>":"<input>",z)}if(j){v=a("<input>",{id:"combobox_"+ ++k,"class":"picklistbox "+j,name:j,value:a(u).find(j).text(),size:h==f.VERBOSE?15:25,readonly:n});v.autocomplete(p(j))}u=D(m);if(h==f.VERBOSE)E=a("<label>",{text:j.capitalize().addspaces()+":",
"for":"combobox_"+k});switch(h){case f.PLAIN:m.append(w).append(" ").append(t).append(" ").append(v).append(" ").append(u);break;case f.TEXTAREA:m.append(w).append(" ").append(v).append(" ").append(u).append(" ").append(t);break;case f.VERBOSE:m.append(E).append(" ").append(v).append(" ").append(w).append(" ").append(t).append(" ").append(u);break;case f.SIMPLE:m.append(v).append(" ").append(u);break;case f.ONLY_TEXTAREA:m.append(w).append(" ").append(u).append(" ").append(t);break;default:i("warning! unexpected style!",
"warn");i(h,"warn")}v&&r(v);if((h==f.PLAIN||h==f.VERBOSE)&&g[j.capitalize()])(function(){var G=g[j.capitalize()],A=false;function F(y,H){y=y&&y.type==="autocompleteselect"?H.item.value:v.val();if(y=G[y])if(A)t.autocomplete("option","source",y);else{t.autocomplete({source:y,minLength:0,delay:0});r(t);A=true}else if(A){t.autocomplete("destroy");t.next("button").remove();A=false}return true}v.bind("autocompleteselect change",F);F()})();q.append(m)}}function I(){a("#submit_area").append(a("<button/>",
{text:"Save record",type:"button",click:function(){var d=FormEditor.to_xml(),j=a("#xml_from_editor"),h=j.closest("form");j.val(XML.serialize(d));a.ajax({type:"POST",url:h.attr("action"),dataType:"script",data:h.serialize()});return false}}).button())}function J(d){var j=a(d);d=j.find("extension").text();j=j.find("extensionAuthorityUsed").text();var h=d.indexOf(":"),n;if(h<0){n=null;d=d}else{n=d.substr(0,h);d=d.substr(h+1)}return{authority:j,key:n,value:d}}function K(d,j){var h,n=l.length,m,q;for(h=
0;h<n;++h){m=l[h];if((q=j.authority===m.authority&&j.key===m.key)||m.visible)d.append(a("<option>",{value:h,selected:q,text:m.description}))}}function L(d,j,h){var n=l[h.find("select").val()];h=h.find("textarea").val();var m=d.createElement("extension"),q=d.createElement("extensionAuthorityUsed"),u="";j.appendChild(m);if(n&&n.key)u=n.key+":";u+=h;m.appendChild(d.createTextNode(u));if(n&&n.authority){j.appendChild(q);q.appendChild(d.createTextNode(n.authority))}}function M(d,j,h){d=a("<div/>",{"class":"form_field_container extension",
pbcore:"pbcoreExtension"});var n=J(h);++k;d.append(a("<label/>",{text:"Extension Type: ","for":"ext_type_"+k}));h=a("<select/>",{id:"ext_type_"+k});d.append(h).append(D(d));K(h,n);d.append(a("<br/>"));d.append(a("<label/>",{text:"Extension Value: ","for":"ext_value_"+k}));d.append(a("<br/>"));d.append(a("<textarea>",{text:n.value,id:"ext_value_"+k,"class":"pbcore extension_value",cols:80,rows:5}));j.append(d)}return{objid:null,load:function(){o=false;a.ajax({url:"/assets/picklists.json",dataType:"json",
type:"GET",success:function(d){c=d.picklists;g=d.valuelists;l=d.extension_names;i("got picklists!");b&&FormEditor.create_form()}});a.ajax({url:"/assets/"+FormEditor.objid+".xml",dataType:"xml",type:"GET",success:function(d){b=a(d);i("got data!");c&&FormEditor.create_form()}})},getxml:function(){return b},create_form:function(){if(!o){o=true;s("identifiers","pbcoreIdentifier",x("identifier","identifierSource"),function(d){return a(d).find("identifierSource").text()==="pbcore XML database UUID"});s("titles",
"pbcoreTitle",x("title","titleType"));s("subjects","pbcoreSubject",x(null,"subject",f.SIMPLE));s("descriptions","pbcoreDescription",x("description","descriptionType",f.TEXTAREA));s("genres","pbcoreGenre",x(null,"genre",f.SIMPLE));s("relations","pbcoreRelation",x("relationIdentifier","relationType",f.VERBOSE));s("coverages","pbcoreCoverage",x("coverage","coverageType",f.VERBOSE,true));C("audience_levels","pbcoreAudienceLevel","audienceLevel");C("audience_ratings","pbcoreAudienceRating","audienceRating");
s("creators","pbcoreCreator",x("creator","creatorRole",f.VERBOSE));s("contributors","pbcoreContributor",x("contributor","contributorRole",f.VERBOSE));s("publishers","pbcorePublisher",x("publisher","publisherRole",f.VERBOSE));s("rights_summaries","pbcoreRightsSummary",x("rightsSummary",undefined,f.ONLY_TEXTAREA));s("extensions","pbcoreExtension",M);I()}},to_xml:function(){var d=XML.newDocument("PBCoreDescriptionDocument","http://www.pbcore.org/PBCore/PBCoreNamespace.html"),j=d.documentElement;j.appendChild(d.createComment("serialized in JavaScript at "+
(new Date).toString()));a("div.form_field_container").each(function(){var h=a(this),n=h.attr("pbcore"),m=d.createElement(n);j.appendChild(m);n==="pbcoreExtension"?L(d,m,h):a("input, textarea",h).each(function(){var q=d.createElement(this.name);m.appendChild(q);q.appendChild(d.createTextNode(this.value))})});a("div.pbcorechecks").each(function(){var h=a(this),n=h.attr("pbcore");a("input:checked",h).each(function(){var m=d.createElement(n),q=d.createElement(this.name);j.appendChild(m);m.appendChild(q);
q.appendChild(d.createTextNode(this.value))})});return d}}}(jQuery);$(function(){$(".sidebarSearchLinks a").click(function(){$(this).closest("tr").next().slideToggle();return false})});$.fn.ipblock=function(){function a(b){b=[b>>24&255,b>>16&255,b>>8&255,b&255];return b.join(".")}return $(this).each(function(){var b=$(this),c=$("<span/>"),g=b.find(".ipedit"),l=b.find(".netmaskedit");function k(){var o=g.val().split("."),f=parseInt(l.val());if(f===0)c.text("(all IP addresses)");else if(f===32)c.text("("+o.join(".")+" only)");else{f=2147483647>>f-1;var i=o[0]<<24|o[1]<<16|o[2]<<8|o[3];o=i&~f;f=i|f;c.text("("+a(o)+"\u2013"+a(f)+")")}}k();g.ipaddress();b.find(".ipedit, .netmaskedit").change(k);
b.find(".ip_octet").blur(k);l.after($("<a/>",{text:"remove","class":"destroy_link",click:function(){b.remove()},css:{cursor:"pointer"}})).after(" ").after(c).after(" ")})};
$(function(){$("p.ipblock").ipblock();var a=$("#strings");a[0]&&a.after($("<p/>").append($("<a/>",{text:"Add another\u2026",css:{cursor:"pointer"},click:function(){var b,c=$("<p/>",{"class":"ipblock"});c.append($("<input/>",{name:"ipranges[]",type:"text","class":"ipedit"}));c.append(" / ");var g=$("<select/>",{name:"netmasks[]","class":"netmaskedit"});for(b=32;b>=0;--b)g.append($("<option/>",{value:b,text:b,selected:b==24}));c.append(g);a.append(c);c.ipblock()}})))});(function(a){a.fn.caret=function(b,c){function g(f,i,p){if(f.setSelectionRange){f.focus();f.setSelectionRange(i,p)}else if(f.createTextRange){f=f.createTextRange();f.collapse(true);f.moveEnd("character",p);f.moveStart("character",i);f.select()}}if(b!=null&&c!=null)return this.each(function(){g(this,b,c)});else if(b!=null)return this.each(function(){g(this,b,b)});else{var l=this[0];if(l.createTextRange){var k=document.selection.createRange().duplicate(),o=l.value.lastIndexOf(k.text)+k.text.length;
k.moveEnd("character",l.value.length);l=k.text==""?l.value.length:l.value.lastIndexOf(k.text);return[l,o]}else return[l.selectionStart,l.selectionEnd]}}})(jQuery);(function(a){a.fn.ipaddress=function(){return a(this).each(function(){var b=a(this);if(!b.hasClass("ip-enabled")){b.hide();for(var c=this.value?this.value.split("."):["","","",""],g=[],l=b.attr("name").replace(/\[/g,"_").replace(/\]/g,""),k=0;k<=3;k++)g.push('<input type="text" class="ip_octet" id="'+l+"_octet_"+(k+1)+'" maxlength="3" value="'+c[k]+'" />');c=g.join(".");b.after(a('<div class="ip_container" style="display: inline'+(a.browser.msie?"":"-block")+';"/>').html(c));b.addClass("ip-enabled")}function o(i){if(i.shiftKey)return false;
return i.keyCode>=48&&i.keyCode<=57||i.keyCode>=96&&i.keyCode<=105}function f(i){var p=[8,9,13,27,35,36,37,39,46,48,96,49,97,50,98,51,99,52,100,53,101,54,102,55,103,56,104,57,105,110,190];if(i.shiftKey&&i.keyCode!=9)return false;for(var r=0,s;s=p[r];r++)if(i.keyCode==s)return true;return false}a("input.ip_octet").bind("keydown",function(i){if(!f(i))return false;var p=a(this).next("input.ip_octet"),r=a(this).prev("input.ip_octet");if((i.keyCode==110||i.keyCode==190)&&this.value.length)if(p.length){a(this).trigger("blur");
p.focus();return false}if(a(this).caret()[1]-a(this).caret()[0]&&o(i))return true;if(this.value.length==this.getAttribute("maxlength")&&a(this).caret()[0]==this.getAttribute("maxlength")&&(o(i)||i.keyCode==39)||i.keyCode==39&&a(this).caret()[0]==this.value.length)if(p.length){a(this).trigger("blur");p.focus().caret(0);return true}if(i.keyCode==37&&a(this).caret()[0]==0)if(r.length){a(this).trigger("blur");r.caret(r.val().length);return false}if(i.keyCode==8&&a(this).caret()[0]==0&&a(this).caret()[0]==
a(this).caret()[1])if(r.length){a(this).trigger("blur");r.focus().caret(r.val().length);return false}}).bind("keyup",function(){if(a("input.ip_octet",a(this).parent()).filter(function(){return this.value.length}).length==4){var i=[];a("input.ip_octet",a(this).parent()).each(function(){i.push(this.value)});b.val(i.join("."))}}).bind("blur",function(){if(this.value>255)this.value=255})})}})(jQuery);(function(a){a.template=function(c,g){return new a.template.instance(c,g)};a.template.instance=function(c,g){if(g&&g.regx)g.regx=this.regx[g.regx];this.options=a.extend({compile:false,regx:this.regx.standard},g||{});this.html=c;this.options.compile&&this.compile();this.isTemplate=true};a.template.regx=a.template.instance.prototype.regx={jsp:/\$\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,ext:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,jtemplates:/\{\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}\}/g};
a.template.regx.standard=a.template.regx.jsp;a.template.helpers=a.template.instance.prototype.helpers={substr:function(c,g,l){return String(c).substr(g,l)}};a.extend(a.template.instance.prototype,{apply:function(c){if(this.options.compile)return this.compiled(c);else{var g=this,l=this.helpers,k=function(o,f,i,p){if(i)if(i.substr(0,5)=="this.")return g.call(i.substr(5),c[f],c);else{if(p){o=/^\s*['"](.*)["']\s*$/;p=p.split(",");for(var r=0,s=p.length;r<s;r++)p[r]=p[r].replace(o,"$1");p=[c[f]].concat(p)}else p=
[c[f]];return l[i].apply(l,p)}else return c[f]!==undefined?c[f]:""};return this.html.replace(this.options.regx,k)}},compile:function(){var c=a.browser.mozilla?"+":",";function g(k,o,f,i){if(f){i=i?","+i:"";if(f.substr(0,5)!="this.")f="fm."+f+"(";else{f='this.call("'+f.substr(5)+'", ';i=", values"}}else{i="";f="(values['"+o+"'] == undefined ? '' : "}return"'"+c+f+"values['"+o+"']"+i+")"+c+"'"}var l;if(a.browser.mozilla)l="this.compiled = function(values){ return '"+this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,
"\\n").replace(/'/g,"\\'").replace(this.options.regx,g)+"';};";else{l=["this.compiled = function(values){ return ['"];l.push(this.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.options.regx,g));l.push("'].join('');};");l=l.join("")}eval(l);return this}});var b={domManip:a.fn.domManip,text:a.fn.text,html:a.fn.html};a.fn.domManip=function(c){if(c[0].isTemplate){c[0]=c[0].apply(c[1]);delete c[1]}var g=b.domManip.apply(this,arguments);return g};a.fn.html=function(c,
g){if(c&&c.isTemplate)c=c.apply(g);return c=b.html.apply(this,[c])};a.fn.text=function(c,g){if(c&&c.isTemplate)c=c.apply(g);return c=b.text.apply(this,[c])}})(jQuery);jQuery.fn.supersleight=function(a){a=jQuery.extend({imgs:true,backgrounds:true,shim:"x.gif",apply_positioning:true},a);return this.each(function(){jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7&&parseInt(jQuery.browser.version,10)>4&&jQuery(this).find("*").andSelf().each(function(b,c){b=jQuery(c);if(a.backgrounds&&b.css("background-image").match(/\.png/i)!==null){c=b.css("background-image");c=c.substring(5,c.length-2);var g=b.css("background-repeat")=="no-repeat"?"crop":"scale";c={filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
c+"', sizingMethod='"+g+"')","background-image":"url("+a.shim+")"};b.css(c)}if(a.imgs&&b.is("img[src$=png]")){c={width:b.width()+"px",height:b.height()+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b.attr("src")+"', sizingMethod='scale')"};b.css(c).attr("src",a.shim)}if(a.apply_positioning&&b.is("a, input")&&(b.css("position")===""||b.css("position")=="static"))b.css("position","relative")})})};var XML;if(XML&&(typeof XML!="object"||XML.NAME))throw new Error("Namespace 'XML' already exists");XML={};XML.NAME="XML";XML.VERSION=1;
XML.newDocument=function(a,b){a||(a="");b||(b="");if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b,a,null);else{var c=new ActiveXObject("MSXML2.DOMDocument");if(a){var g="",l=a,k=a.indexOf(":");if(k!=-1){g=a.substring(0,k);l=a.substring(k+1)}if(b)g||(g="a0");else g="";a="<"+(g?g+":":"")+l+(b?" xmlns:"+g+'="'+b+'"':"")+"/>";c.loadXML(a)}return c}};
XML.serialize=function(a){if(typeof XMLSerializer!="undefined")return(new XMLSerializer).serializeToString(a);else if(a.xml)return a.xml;else throw"XML.serialize is not supported or can't serialize "+a;};
