function switchElementDisplay(id) {var elem	= dims_getelem(id);var img		= dims_getelem('img'+id);if (elem.style.display=="block") {elem.style.display		= "none";elem.style.visibility	= "hidden";img.src					= "/img/plus.gif";}else {elem.style.display	= "block";elem.style.visibility	= "visible";img.src	= "/img/minus.gif";}}dims_window_onload_functions=new Array();function dims_window_onload_stock(A){dims_window_onload_functions[dims_window_onload_functions.length]=A}function dims_window_onload_launch(){window.onload=function(){for(i=0;i<dims_window_onload_functions.length;i++){dims_window_onload_functions[i]()}}}function dims_openwin(C,A,D,B){var F=(screen.height-(D+60))/2;var E=(screen.width-A)/2;if(B==""){B="dimswin"}dimswin=window.open(C,B,"top="+F+",left="+E+",width="+A+", height="+D+", status=no, menubar=no, toolbar=no, scrollbars=yes, resizable=yes, screenY=20, screenX=20");dimswin.focus()}function dims_confirmform(B,A){if(confirm(A)){B.submit()}}function dims_confirmlink(B,A){if(confirm(A)){location.href=B}}function dims_switchstyle(B,A){B.style.filter="alpha(opacity:"+(A)+")";B.style.MozOpacity=A/100}function dims_switchdisplay(A){e=dims_getelem(A);if(e){e.style.display=(e.style.display=="none")?"block":"none"}}function dims_validatefield(field_label,field_object,field_type){var ok=true;var i;var nbpoint=0;var msg=new String();var reg=new RegExp("<FIELD_LABEL>","gi");if(field_object){field_value=field_object.value;if(field_type=="selected"){msg=lstmsg[9];ok=(field_object.selectedIndex>=0)}if(field_type=="checked"){msg=lstmsg[9];ok=false;for(c=0;c<field_object.length;c++){if(field_object[c].checked){ok=true}}}if(field_type=="email"){var email=field_value;var aroba=email.indexOf("@");if(aroba==-1){ok=false;msg=lstmsg[0]}if(ok){var point=email.indexOf(".",aroba);if((point==-1)||(point==(aroba+1))){ok=false;msg=lstmsg[1]}}if(ok){var point=email.lastIndexOf(".");if((point+1)==email.length){ok=false;msg=lstmsg[2]}}if(ok){point=email.indexOf("..");if(point!=-1){ok=false;msg=lstmsg[3]}}}if(field_type=="emptyemail"){if(field_value.length!=0){var email=field_value;var aroba=email.indexOf("@");if(aroba==-1){ok=false;msg=lstmsg[0]}if(ok){var point=email.indexOf(".",aroba);if((point==-1)||(point==(aroba+1))){ok=false;msg=lstmsg[1]}}if(ok){var point=email.lastIndexOf(".");if((point+1)==email.length){ok=false;msg=lstmsg[2]}}if(ok){point=email.indexOf("..");if(point!=-1){ok=false;msg=lstmsg[3]}}}}if(field_type=="color"){var color=new dims_rgbcolor(field_value);if(!color.ok){ok=false;msg=lstmsg[10]}}if(field_type=="string"){if(field_value.replace(/(^\s*)|(\s*$)/g,"").length==0){ok=false;msg=lstmsg[4]}}if(field_type=="int"){if(field_value.length==0||field_value.length>12){ok=false}for(i=0;i<field_value.length;i++){if(field_value.charAt(i)<"0"||field_value.charAt(i)>"9"){ok=false}}if(!ok){msg=lstmsg[5]}}if(field_type=="emptyint"){if(field_value.length>12){ok=false}for(i=0;i<field_value.length;i++){if(field_value.charAt(i)<"0"||field_value.charAt(i)>"9"){ok=false}}if(!ok){msg=lstmsg[5]}}if(field_type=="float"){if(field_value.length==0){ok=false}for(i=0;i<field_value.length;i++){if(field_value.charAt(i)=="."||field_value.charAt(i)==","){nbpoint++}else{if(field_value.charAt(i)<"0"||field_value.charAt(i)>"9"){ok=false}}}if(nbpoint>1){ok=false}if(!ok){msg=lstmsg[6]}}if(field_type=="emptyfloat"){for(i=0;i<field_value.length;i++){if(field_value.charAt(i)=="."){nbpoint++}if(field_value.charAt(i)<"0"||field_value.charAt(i)>"9"){ok=false}}if(nbpoint>1){ok=false}if(!ok){msg=lstmsg[6]}}if(field_type=="date"){var thedate=field_value.split("/");if(thedate.length!=3||isNaN(parseInt(thedate[0]))||isNaN(parseInt(thedate[1]))||isNaN(parseInt(thedate[2]))){thedate=field_value.split("-")}if(thedate.length!=3||isNaN(parseInt(thedate[0]))||isNaN(parseInt(thedate[1]))||isNaN(parseInt(thedate[2]))){thedate=field_value.split(":")}if(thedate.length!=3||isNaN(parseInt(thedate[0]))||isNaN(parseInt(thedate[1]))||isNaN(parseInt(thedate[2]))){ok=false}if(ok){var datetotest=new Date(eval(thedate[2]),eval(thedate[1])-1,eval(thedate[0]));var year=datetotest.getYear();if((Math.abs(year)+"").length<4){year=year+1900}ok=((datetotest.getDate()==eval(thedate[0]))&&(datetotest.getMonth()==eval(thedate[1])-1)&&(year==eval(thedate[2])))}if(!ok){msg=lstmsg[7]}}if(field_type=="time"){if(field_value.length!=5){ok=false}else{h=field_value.substring(0,2);m=field_value.substring(3,5);if(parseInt(h)<0||parseInt(h)>23){ok=false}if(parseInt(m)<0||parseInt(m)>59){ok=false}madate=new Date(1,1,2000,h,m);if(madate=="NaN"||field_value.charAt(2)!=":"){ok=false}}if(!ok){msg=lstmsg[8]}}if(field_type=="emptydate"){if(field_value.length!=0){var thedate=field_value.split("/");if(thedate.length!=3||isNaN(parseInt(thedate[0]))||isNaN(parseInt(thedate[1]))||isNaN(parseInt(thedate[2]))){thedate=field_value.split("-")}if(thedate.length!=3||isNaN(parseInt(thedate[0]))||isNaN(parseInt(thedate[1]))||isNaN(parseInt(thedate[2]))){thedate=field_value.split(":")}if(thedate.length!=3||isNaN(parseInt(thedate[0]))||isNaN(parseInt(thedate[1]))||isNaN(parseInt(thedate[2]))){ok=false}if(ok){var datetotest=new Date(eval(thedate[2]),eval(thedate[1])-1,eval(thedate[0]));var year=datetotest.getYear();if((Math.abs(year)+"").length<4){year=year+1900}ok=((datetotest.getDate()==eval(thedate[0]))&&(datetotest.getMonth()==eval(thedate[1])-1)&&(year==eval(thedate[2])))}if(!ok){msg=lstmsg[7]}}}if(field_type=="emptytime"){if(field_value.length!=0){if(field_value.length!=5){ok=false}else{h=field_value.substring(0,2);m=field_value.substring(3,5);if(parseInt(h)<0||parseInt(h)>23){ok=false}if(parseInt(m)<0||parseInt(m)>59){ok=false}madate=new Date(1,1,2000,h,m);if(madate=="NaN"||field_value.charAt(2)!=":"){ok=false}}if(!ok){msg=lstmsg[8]}}}}else{ok=false}if(!ok){alert(msg.replace(reg,field_label));if(field_type!="checked"){field_object.style.background=error_bgcolor;field_object.focus()}}return(ok)}function dims_checkall(F,B,G,C){var A=F.elements.length;var E=new RegExp(B,"g");if(isNaN(C)){C=false}for(var D=0;D<A;D++){var H=F.elements[D];if(C){if(H.id.match(E)){H.checked=G}}else{if(H.name.match(E)){H.checked=G}}}}var timer_started=false;var popup_displayed=false;var posx=0;var posy=0;var msg="empty";function dims_showpopup_delayed(A,C){if(timer_started){A=parseInt(A);if(C==""||C==null){C="dims_popup"}var B=dims_getelem(C);B.style.display="none";B.innerHTML=msg;tmpleft=parseInt(posx)+20;tmptop=parseInt(posy);if(A>0){B.style.width=A+"px"}else{A=parseInt(B.offsetWidth)}if(20+A+parseInt(tmpleft)>parseInt(document.body.offsetWidth)){tmpleft=parseInt(document.body.offsetWidth)-A-10}B.style.top=tmptop+"px";B.style.left=tmpleft+"px";B.style.display="block";B.style.visibility="visible";popup_displayed=true}}function dims_addslashes(A){A=A.replace(/\\/g,"\\\\");A=A.replace(/\'/g,"\\'");A=A.replace(/\"/g,'\\"');return(A)}function dims_showpopup(E,B,F,D,G,A,C){if(G==""||G==null){G="dims_popup"}if(A==""||A==null){A=0}else{A=A*1}if(C==""||C==null){C=0}else{C=C*1}msg=E;if(B==""){B=200}if(!D){var D=""}if(!F){var F=window.event}if(F.pageX||F.pageY){posx=F.pageX;posy=F.pageY}else{if(F.clientX||F.clientY){posx=F.clientX+document.body.scrollLeft;posy=F.clientY+document.body.scrollTop}}if(A!=0){posx=posx+A}if(C!=0){posy=posy+C}if(D=="click"){timer_started=true;dims_showpopup_delayed(B,G)}else{if(!timer_started){timer_started=true;setTimeout("dims_showpopup_delayed("+B+",'"+G+"')",10*timerdelay)}if(popup_displayed){dims_showpopup_delayed(B,G)}}}function dims_movepopup(A,B){if(B==""||B==null){B="dims_popup"}if(!A){var A=window.event}if(A.pageX||A.pageY){posx=A.pageX;posy=A.pageY}else{if(A.clientX||A.clientY){posx=A.clientX+document.body.scrollLeft;posy=A.clientY+document.body.scrollTop}}if(popup_displayed){dims_showpopup_delayed(0,B)}}function dims_hidepopup(namepopup){if(namepopup==""||namepopup==null){namepopup="dims_popup"}timer_started=false;popup_displayed=false;var dims_popup=(document.getElementById)?document.getElementById(namepopup):eval("document.all["+namepopup+"]");with(dims_popup.style){display="none";visibility="hidden"}}function dims_getelem(elem,doc){if(!doc){doc=document}return(doc.getElementById)?doc.getElementById(elem):eval("document.all['"+dims_addslashes(elem)+"']")}function dims_gethttpobject(C){var A=false;if(!A&&typeof XMLHttpRequest!="undefined"){try{A=new XMLHttpRequest()}catch(B){A=false}}return A}function dims_sendxmldata(E,C,D,B,A){if(!B){return false}if(E=="GET"){if(D=="null"){B.open("GET",C,A);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=ISO-8859-15")}else{B.open("GET",C+"?"+D,A);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=ISO-8859-15")}B.send(null)}else{if(E=="POST"){B.open("POST",C,A);B.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=ISO-8859-15");B.send(D)}}return true}function dims_xmlhttprequest(C,D,B,A){if(isNaN(B)){B=false}if(isNaN(A)){A=false}xmlhttp=dims_gethttpobject();dims_sendxmldata("GET",C,D,xmlhttp,B);if(A){return(xmlhttp.responseXML)}else{return(xmlhttp.responseText)}}function dims_xmlhttprequest_tofunction(C,D,E,F,A){var B=dims_gethttpobject();if(isNaN(A)){A=false}if(B){B.onreadystatechange=function(){if(B.readyState==4){if(B.status==200){if(A){E(B.responseXML,F)}else{E(B.responseText,F)}}}}}return !dims_sendxmldata("GET",C,D,B,true)}function dims_xmlhttprequest_todiv(url,data,sep){var xmlhttp=dims_gethttpobject();var args;if(xmlhttp){args=dims_xmlhttprequest_todiv.arguments;xmlhttp.onreadystatechange=function(){if(!isNaN(xmlhttp.readyState)&&xmlhttp.readyState==4){if(xmlhttp.status==200){var tabxmlvalue=new Array();var result=xmlhttp.responseText;if(sep==""){tabxmlvalue[0]=result}else{tabxmlvalue=result.split(sep)}for(i=0;i<args.length-3;i++){if(tabxmlvalue[i]){dims_getelem(args[i+3]).innerHTML=tabxmlvalue[i];var x=dims_getelem(args[i+3]).getElementsByTagName("script");for(var i=0;i<x.length;i++){eval(x[i].text)}}else{dims_getelem(args[i+3]).innerHTML=""}}}}}}return !dims_sendxmldata("GET",url,data,xmlhttp,true)};