/**
 * Project: AJAX
 * 
 * @author Eric Garin <eric@xmlnest.com>
 * @link http://www.xmlnest.com
 *
 */
var def={DB_ADD:"DB_ADD",DB_UPDATE:"DB_UPDATE",DB_DELETE:"DB_DELETE",DB_SEARCH:"DB_SEARCH",FORM_ADD:"FORM_ADD",FORM_UPDATE:"FORM_UPDATE"};function init_table(a){var d=slot.get(a);var c=d.rows.length;for(var b=0;b<c;b++){d.deleteRow(0)}}function create_cell(c,b){var a=c.insertCell(-1);a.innerHTML=b;return(a)}function delete_rows(f,c,a){var g=new RegExp("^"+c+":");for(var e=0;e<a.length;e++){var h=slot.get(f);var k=h.rows;for(var d=0;d<k.length;d++){var b=k[d].id.replace(g,"");if(b==a[e]){h.deleteRow(d);break}}}}function DOMtoString(a){try{return(new XMLSerializer()).serializeToString(a)}catch(b){try{return a.xml}catch(b){alert("Xmlserializer not supported")}}return false}function set_class(a,b){a.setAttribute("class",b);a.setAttribute("className",b)}function getGroupNode(g,e){var b=document.getElementsByTagName(e);var f=null,a=null;var c=new Array();for(var d=0;d<b.length;d++){f=b[d].getAttribute("id");if(f!=null){a=f.split(":")[0];if(a==g){c.push(b[d])}}}return(c)}var xut={encode:function(b){var a=String(b);a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");a=a.replace(/'/g,"&apos;");a=a.replace(/"/g,"&quot;");return(a)},print:function(b){var a=xut.encode(b);a=a.replace(/&gt;&lt;/g,"&gt;<br/>&lt;");return(a)}};function isIE(){if(arguments.length>0){var a=arguments[0];if(a==6){if(window.XMLHttpRequest){return(false)}else{return(true)}}else{alert("Version detection not supported yet !");return(false)}}else{if(window.attachEvent){return(true)}else{return(false)}}}var slot={get:function(a){var b=document.getElementById(a);if(b){return(b)}else{b=document.getElementsByName(a);if(b){return(b.item(0))}}return(null)},show:function(a){slot.get(a).style.display="block"},hide:function(a){slot.get(a).style.display="none"}};function Popup(h,c,b,d,e){this.obj=slot.get(h);this.show=function(){slot.show(h)};this.hide=function(){slot.hide(h)};this.alert=function(i){this.show();slot.get(c).innerHTML=i;this.obj.style.zIndex=15};this.size=function(i,k){var j=this.obj;j.style.height=String(i+"px");j.style.width=String(k+"px")};this.position=function(i){var j=this.obj;if((i=="fixed")&&(isIE(6))){j.style.position="absolute"}else{j.style.position=i}};this.coords=function(k,j){var i=this.obj;i.style.top=String(k+"px");i.style.left=String(j+"px")};this.centered=function(i,j){var l=((screen.height-i)/2)-120;var k=((screen.width-j)/2);if(isIE(6)){}this.coords(l,k)};this.size(b,d);if(e==null){this.position("fixed");this.centered(b,d)}else{var a=e[0];var g=e[1];var f=e[2];this.position(a);this.coords(g,f)}}var zone={on:function(d){var a=getGroupNode("Z","DIV");var b=null;for(var c=0;c<a.length;c++){b=null;if(a[c].name){b=a[c].name}else{if(a[c].id){b=a[c].id}}if(b){zone.off(b)}}slot.show(d)},off:function(a){slot.hide(a)}};var mask={show:function(b){var a=slot.get(b).parentNode;slot.get(b).style.height=a.style.height;slot.get(b).style.width=a.style.width;slot.show(b)},hide:function(a){slot.hide(a)}};