typeof jQuery=="undefined"&&(jQuery=function(){}),typeof jQuery.classBehaviours=="undefined"&&(jQuery.classBehaviours=function(){}),typeof jQuery.classBehaviours.handlers=="undefined"&&(jQuery.classBehaviours.handlers=function(){}),jQuery.classBehaviours.handlers.reloadFromUrl={name:"reloadFromUrl",refocus:"",index:0,respite:100,start:function(n){n.id=n.id?n.id:this.name+this.index++,automatic=jQuery.classBehaviours.utilities.getClassParameter(n,"auto","no"),automatic=="yes"?this.clicked(n):parseInt(automatic)>0?setTimeout('jQuery.classBehaviours.handlers.reloadFromUrl.clicked(document.getElementById("'+n.id+'"))',parseInt(automatic)):n.nodeName=="IFRAME"?this.clicked(n):n.nodeName=="FORM"?n.onsubmit=this.clicked:n.nodeName=="BUTTON"?n.onclick=this.clicked:n.nodeName=="INPUT"&&(n.type=="button"||n.type=="submit")?n.onclick=this.clicked:n.nodeName=="INPUT"&&(n.type=="radio"||n.type=="checkbox")?n.onclick=this.changed:n.nodeName=="INPUT"?n.onchange=this.changed:n.nodeName=="SELECT"?n.onchange=this.changed:n.nodeName=="TEXTAREA"?n.onchange=this.changed:n.nodeName=="FIELDSET"?null:n.onclick=this.clicked,n.nodeName=="A"&&n.href.indexOf("javascript:__doPostBack")>-1&&(n.href="",n.onclick=this.clicked)},wait:function(n,t,i,r){var u=jQuery.classBehaviours.handlers.reloadFromUrl;targetId=jQuery.classBehaviours.utilities.getClassParameter(t,"target",""),targetNode=targetId!=""?document.getElementById(targetId):t,jQuery.classBehaviours.utilities.setClassParameter(targetNode,"progress",n),jQuery.classBehaviours.utilities.setClassParameter(targetNode,"error",i),shownStatus=new Date-r>u.respite?1:0,jQuery.classBehaviours.utilities.setClassParameter(targetNode,"show",shownStatus)},insert:function(n,t){var e=jQuery.classBehaviours.handlers.reloadFromUrl,f,u;targetId=jQuery.classBehaviours.utilities.getClassParameter(t,"target",null),sourceId=jQuery.classBehaviours.utilities.getClassParameter(t,"source",null),noformId=jQuery.classBehaviours.utilities.getClassParameter(t,"noform",null),nonIntrusive=jQuery.classBehaviours.utilities.getClassParameter(t,"gently","0")=="1",importedNode=sourceId!=null?jQuery.classBehaviours.utilities.getXmlElementById(sourceId,n,!0):n;if(nonIntrusive)for(importedChildNodes=importedNode.getElementsByTagName("*"),f=importedChildNodes.length-1;f>=0;f--){exportedChildNodeId=importedChildNodes[f].getAttribute("id");if(exportedChildNodeId!=null&&exportedChildNodeId!=""){exportedChildNode=document.getElementById(exportedChildNodeId);if(exportedChildNode!=null){exportedChildNode.className=importedChildNodes[f].className!=null?importedChildNodes[f].className:importedChildNodes[f].getAttribute("class");if(importedChildNodes[f].nodeName=="SELECT")for(importedSelectOptions=importedChildNodes[f].getElementsByTagName("OPTION"),exportedSelectOptions=exportedChildNode.getElementsByTagName("OPTION"),selectOptionsLength=importedSelectOptions.length>exportedSelectOptions.length?importedSelectOptions.length:exportedSelectOptions.length,u=selectOptionsLength-1;u>=0;u--)u<exportedSelectOptions.length?u<importedSelectOptions.length?(exportedSelectOptions[u].firstChild.nodeValue=importedSelectOptions[u].firstChild.nodeValue,exportedSelectOptions[u].value=importedSelectOptions[u].value):exportedSelectOptions[u].parentNode.removeChild(exportedSelectOptions[u]):(newOptionElement=document.createElement("OPTION"),newOptionText=document.createTextNode(importedSelectOptions[u].firstChild.nodeValue),newOptionElement.appendChild(newOptionText),newOptionElement.setAttribute("value",importedSelectOptions[u].value),exportedChildNode.appendChild(newOptionElement));importedHTML=jQuery.classBehaviours.ajax.serialize(importedChildNodes[f]),importedHTML=importedHTML.substring(importedHTML.indexOf(">")+1,importedHTML.lastIndexOf("<")),isInlineMarkup=exportedChildNode.innerHTML.toUpperCase().indexOf("<DIV")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<SECTION")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<ARTICLE")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<HEADER")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<FOOTER")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<NAV")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<FIELDSET")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<SELECT")<0&&exportedChildNode.nodeName!="SELECT"&&exportedChildNode.innerHTML.toUpperCase().indexOf("<OPTION")<0&&exportedChildNode.innerHTML.toUpperCase().indexOf("<TEXTAREA")<0&&exportedChildNode.nodeName!="TEXTAREA"&&exportedChildNode.innerHTML.toUpperCase().indexOf("<INPUT")<0&&exportedChildNode.nodeName!="INPUT",isInlineMarkup&&(exportedChildNode.innerHTML=importedHTML)}}}else{importedHTML=jQuery.classBehaviours.ajax.serialize(importedNode,!0),importedHTML.indexOf("<body")>-1&&(importedHTML=importedHTML.split("<body")[1].split("</body>")[0],importedHTML=importedHTML.substr(importedHTML.indexOf(">")+1,importedHTML.length)),targetId==null?(newDiv=document.createElement("div"),newDiv.id=e.name+e.index++,t.parentNode.replaceChild(newDiv,t),targetNode=document.getElementById(newDiv.id)):targetNode=document.getElementById(targetId);if(noformId=="1"&&new String(importedHTML).toLowerCase().indexOf("<form")>-1){url=new String(importedHTML).toLowerCase(),index=url.indexOf("action")+8,url=url.substr(index,url.length-index),index=url.indexOf('"')>url.indexOf(">")?url.indexOf(">"):url.indexOf('"'),url=url.substr(0,index),location.href=url;return}targetNode!=null&&(targetNode.innerHTML=importedHTML),e.refocus!=null&&(e.refocus.nodeName=="INPUT"||e.refocus.nodeName=="SELECT"||e.refocus.nodeName=="TEXTAREA")&&e.refocus.focus()}jQuery.classBehaviours.utilities.setClassParameter(targetNode,"progress",4),jQuery.classBehaviours.utilities.setClassParameter(targetNode,"error",200),jQuery.classBehaviours.parser.parseNode(targetNode),replaceTitleId=jQuery.classBehaviours.utilities.getClassParameter(t,"title",null),replaceTitleId!=null&&(document.getElementById(replaceTitleId).innerHTML=t.title)},clicked:function(n){var t=typeof this.nodeName=="undefined"?n:this,i=jQuery.classBehaviours.handlers.reloadFromUrl;return i.refocus=t,targetHref=t.getAttribute("href"),targetSrc=t.getAttribute("src"),targetLongdesc=t.getAttribute("longdesc"),rootForm=jQuery.classBehaviours.utilities.rootNode(t,"FORM",null),targetAction=rootForm.getAttribute("action"),hrefTarget=jQuery.classBehaviours.utilities.getClassParameter(t,"id",""),targetUrl=targetHref!=null&&targetHref!=""?targetHref:hrefTarget!=null&&hrefTarget!=""?document.getElementById(hrefTarget).href:targetAction!=null&&targetAction!=""?targetAction:targetLongdesc!=null&&targetLongdesc!=""?targetLongdesc:targetSrc!=null&&targetSrc!=""?targetSrc:document.location.href,postValues=jQuery.classBehaviours.ajax.getPostValues(t),postPrefix=targetUrl.indexOf("?")<0?"?":"&",reloadInterval=parseInt(jQuery.classBehaviours.utilities.getClassParameter(t,"interval","-1")),reloadInterval>0&&setTimeout('jQuery.classBehaviours.handlers.reloadFromUrl.clicked(document.getElementById("'+t.id+'"));',reloadInterval),new String(rootForm.getAttribute("method")).toLowerCase()=="post"?jQuery.classBehaviours.ajax.addRequest(targetUrl,i.insert,i.wait,postValues,t):jQuery.classBehaviours.ajax.addRequest(targetUrl+postPrefix+postValues,i.insert,i.wait,null,t)},changed:function(n){var i=typeof this.nodeName=="undefined"?n:this,r=jQuery.classBehaviours.handlers.reloadFromUrl,t;submitNode=jQuery.classBehaviours.utilities.rootNode(i,"FIELDSET",null),submitNode.nodeName=="BODY"&&(submitNode=jQuery.classBehaviours.utilities.rootNode(i,"FORM",null)),buttonNodes=submitNode.getElementsByTagName("BUTTON");if(buttonNodes.length>0)submitNode=buttonNodes[0];else for(inputNodes=submitNode.getElementsByTagName("INPUT"),t=0;t<inputNodes.length;t++)(inputNodes[t].type=="submit"||inputNodes[t].type=="button")&&(submitNode=inputNodes[t]);return void r.clicked(submitNode),!0}},typeof jQuery.fn!="undefined"&&(jQuery.fn.reloadFromUrl=function(){return this.each(function(){jQuery.classBehaviours.handlers.reloadFromUrl.start(this)})},$(document).ready(function(){$(".reloadFromUrl").reloadFromUrl()}))
