
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");}
var posX=0;var posY=0;function mouseMove(evt){if(document.layers){posX=evt.x;posY=evt.y;}
if(document.all){posX=event.clientX;posY=event.clientY;}else{if(document.getElementById){posX=evt.clientX;posY=evt.clientY;}}}
if(document.layers)
document.captureEvents(Event.MOUSEMOVE);if(document.layers||document.all)
document.onmousemove=mouseMove;if(document.addEventListener)
document.addEventListener('mousemove',mouseMove,true);function focusOpen(id){$(id).focus();}
function checkStat(btn,id,num){resetCheckStat(id);btn.style.fontWeight='bold';btn.style.color='red';$(id).value=num;}
function resetCheckStat(id){it=1;while($(id+"_cs-"+it)){$(id+"_cs-"+it).style.color='#2B568E';$(id+"_cs-"+it).style.fontWeight='normal';it=it+1;}}
function myModal(page,name,isSmall,height,width,rld){if(isSmall==true){_width="500px";_height="450px";}else{_width="600px";_height="600px";}
if(!isNaN(height)){_height=height+"px";}
if(!isNaN(width)){_width=width+"px";}
win=window.open(page,name,"height="+_height+", width="+_width+", resizable, scrollbars");win.focus();if((isNaN(rld)||rld==1)&&window.top.$('listingFrame')){window.top.$('listingFrame').location.reload();}
return win;}
function iFrameSize(iframeName){if(top.$(iframeName)){height=document.getElementsByTagName('body')[0].offsetHeight;if(top.$(iframeName).height<height)top.$(iframeName).height=height;}}
function getWindowHeight(){var myHeight=0;if(typeof(top.window.innerHeight)=='number'){myHeight=top.window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){myHeight=document.documentElement.clientHeight;}else if(document.body&&document.body.clientHeight){myHeight=document.body.clientHeight;}
return myHeight;}
function initHeight(targetFrame){height=getWindowHeight()-146;iframe=top.$(targetFrame);iframe.height=height;}
function showSubMenu(id){ssm=$(id);if(ssm.style.display=='none')ssm.show();else ssm.hide();}
function showSub(id){if($(id).style.display=='none'){$(id).style.display='block';document.images('sub-'+id).src="/images/pictos/Other/expand.gif";}else{$(id).style.display='none';document.images('sub-'+id).src="/images/pictos/Other/collapse.gif";}}
function showHelp(helpId){help=$(helpId);divFollowMouse(help);help.style.display='block';}
function hideHelp(helpId){help=$(helpId);help.style.display='none';}
function showHelpMsg(msg,caller){if(!showHelpMsg.box){showHelpMsg.box=document.createElement("div");showHelpMsg.box.setAttribute("class","helpbox");showHelpMsg.box.setAttribute("id","helpbox");showHelpMsg.box.innerHTML=msg;showHelpMsg.box.style.top=(posY)+"px";showHelpMsg.box.style.left=(posX)+"px";showHelpMsg.box.style.display='block';document.body.appendChild(showHelpMsg.box);}
help=$('helpbox');}
function hideHelpMsg(){$('helpbox').style.display='none';}
function divFollowMouse(div){div.style.top=(posY+5)+"px";div.style.left=(posX+5)+"px";}
function switchFrames(win){currows=parent.document.getElementById('frameset').rows;if(win.name=='listFrame'){if(currows=='*,2%,5%'||currows=='*,2%,*')nrows='5%,2%,*';else nrows='*,2%,5%';}else{if(currows=='5%,2%,*'||currows=='*,2%,*')nrows='*,2%,5%';else nrows='5%,2%,*';}
resizeFrames('frameset',nrows);}
function resizeFrames(framesetId,size){parent.document.getElementById(framesetId).rows=size;}
function resetFrames(){resizeFrames('frameset','*,2%,*');}
function resetFramesForms(){resizeFrames('frameset','40%,2,*');}
function orderUp(id,ar,num){var tmp=ar[id];ar[id]=ar[id-1];ar[id-1]=tmp;drawList(ar,num);}
function orderDown(id,ar,num){var tmp=ar[id];ar[id]=ar[id+1];ar[id+1]=tmp;drawList(ar,num);}
function resetOL(list){document.getElementById(list).innerHTML="&nbsp;";}
function drawList(ar,num){resetOL('list'+num);var nb=ar.length;var str='<table id="table'+num+'" class="ordertable">';for(var i=0;i<nb;i++){str=str+'<tr><td>'+(i+1+'.')+'</td><td>'+ar[i][2]+'<input type="hidden" name="'+ar[i][1]+'" value="'+ar[i][0]+'" /></td>';if(i!=nb-1)str=str+'<td><img src="/images/pictos/Fleche_down.gif" alt="down" onclick="orderDown('+i+',orderItems'+num+','+num+');"/></td>';else str=str+"<td>&nbsp;</td>";if(i!=0)str=str+'<td><img src="/images/pictos/Fleche_up.gif" alt="up" onclick="orderUp('+i+',orderItems'+num+','+num+');"/></td>';else str=str+"<td>&nbsp;</td>";str=str+'</tr>\n';}
str=str+'</table>\n';document.getElementById('list'+num).innerHTML=str;}
function checkCheckBoxesArray(formRef,checkname,$required){var i=checkname.indexOf("*");var k=0;if((i==0)||(i==checkname.length-1)){searchString=(i)?checkname.substring(0,checkname.length-1):checkname.substring(1,checkname.length);for(var j=0;j<formRef.length;j++){currentElement=formRef.elements[j];currentElementName=currentElement.name;var partialName=(i)?currentElementName.substring(0,searchString.length):currentElementName.substring(currentElementName.length-searchString.length,currentElementName.length);if(partialName==searchString){if(currentElement.checked==true)k++;}}}
if(k==0)return false;else return true;}
function versionConfirm(test,ver){return true;}
function newVer(ver){top.iContent.document.location='/admin/forms/forms.php?action=NEWVER&verId='+ver;return false;}
function switchVisibility(id){if($(id).visible())$(id).hide();else $(id).show();}
function switchVisibility2(id,pic){$(id).toggle();if($(id).visible()){pic.src='/images/pictos/Other/expand_all.gif';pic.alt='Fermer'}else{pic.src='/images/pictos/Other/collapse_all.gif';pic.alt='Ouvrir';}}
function setAllVisible(){for(var i=0;i<arVisibility.length;i++){document.getElementById(arVisibility[i]).style.display='block';}}
function setAllInVisible(){for(var i=0;i<arVisibility.length;i++){document.getElementById(arVisibility[i]).style.display='none';}}
function callFtpImagePut(dir){modalResult=window.showModalDialog('/admin/albums/ftpPop.php?dirname='+dir,'ImagePutpop',"dialogWidth:600px;dialogHeight:400px;scroll:yes;resizable:yes;");top.iContent.dataFrame.document.location='/admin/albums/ftpPutImages.php?generatePics=1&dirname='+dir;}
function unloadForm(){if(document.getElementById('subjs').name=='subjs')return true;else return false;}
function changeGroupDiv(newGroup){oldGroup=document.forms.stuForm.group.value;if(oldGroup!=0)$('gr'+oldGroup).hide();document.forms.stuForm.group.value=newGroup;if(newGroup!=0)$('gr'+newGroup).show();}
function cleanForNewsletter(html){return html.replace(/src=["'](?!https?:\/\/)([^"']+)["']/g,'src="'+Globule.webRoot+'$1"').replace(/href=["'](?!https?:\/\/)([^"']+)["']/g,'href="'+Globule.webRoot+'$1"');}<!--
var GlobalMsg=''
var Language=''
var theform
function Replace(s,seekchar,repchar){var checks="";var tmps="";for(pos=0;pos<s.length;pos++){tmps=s.substring(pos,pos+1);if(tmps==seekchar)
checks=checks+repchar;else
checks=checks+tmps;}
return checks;}
function TrimLeft(str){var resultStr="";var i=len=0;if(str+""=="undefined"||str==null)
return null;str+="";if(str.length==0)
resultStr="";else{len=str.length;while((i<=len)&&(str.charAt(i)==" "))
i++;resultStr=str.substring(i,len);}
return resultStr;}
function TrimRight(str){var resultStr="";var i=0;if(str+""=="undefined"||str==null)
return null;str+="";if(str.length==0)
resultStr="";else{i=str.length-1;while((i>=0)&&(str.charAt(i)==" "))
i--;resultStr=str.substring(0,i+1);}
return resultStr;}
function TrimString(str){var resultStr="";resultStr=TrimLeft(str);resultStr=TrimRight(resultStr);return resultStr;}
function _CF_onError(form_object,input_object,object_value,error_message)
{return false;}
function _CF_hasValue(obj,obj_type)
{if(obj_type=="TEXT"||obj_type=="PASSWORD")
{if(obj.value.length==0)
return false;else
return true;}
else if(obj_type=="SELECT")
{for(i=0;i<obj.length;i++)
{if(obj.options[i].selected)
return true;}
return false;}
else if(obj_type=="SINGLE_VALUE_RADIO"||obj_type=="SINGLE_VALUE_CHECKBOX")
{if(obj.checked)
return true;else
return false;}
else if(obj_type=="RADIO"||obj_type=="CHECKBOX")
{for(i=0;i<obj.length;i++)
{if(obj[i].checked)
return true;}
return false;}}
function _CF_checkeurodate(object_value)
{if(object_value.length==0)
return true;isplit=object_value.indexOf('/');if(isplit==-1||isplit==object_value.length)
return false;sDay=object_value.substring(0,isplit);isplit=object_value.indexOf('/',isplit+1);if(isplit==-1||(isplit+1)==object_value.length)
return false;sMonth=object_value.substring((sDay.length+1),isplit);sYear=object_value.substring(isplit+1);if(!_CF_checkinteger(sMonth))
return false;else
if(!_CF_checkrange(sMonth,1,12))
return false;else
if(!_CF_checkinteger(sYear))
return false;else
if(!_CF_checkrange(sYear,0,null))
return false;else
if(!_CF_checkinteger(sDay))
return false;else
if(!_CF_checkday(sYear,sMonth,sDay))
return false;else
return true;}
function _CF_checkday(checkYear,checkMonth,checkDay)
{maxDay=31;if(checkMonth==4||checkMonth==6||checkMonth==9||checkMonth==11)
maxDay=30;else
if(checkMonth==2)
{if(checkYear%4>0)
maxDay=28;else
if(checkYear%100==0&&checkYear%400>0)
maxDay=28;else
maxDay=29;}
return _CF_checkrange(checkDay,1,maxDay);}
function _CF_checkinteger(object_value)
{if(object_value.length==0)
return true;var decimal_format=".";var check_char;check_char=object_value.indexOf(decimal_format)
if(check_char<1)
return _CF_checknumber(object_value);else
return false;}
function _CF_numberrange(object_value,min_value,max_value)
{if(min_value!=null)
{if(object_value<min_value)
return false;}
if(max_value!=null)
{if(object_value>max_value)
return false;}
return true;}
function _CF_checknumber(object_value)
{if(object_value.length==0)
return true;var start_format=" .+-0123456789";var number_format=" .0123456789";var check_char;var decimal=false;var trailing_blank=false;var digits=false;check_char=start_format.indexOf(object_value.charAt(0))
if(check_char==1)
decimal=true;else if(check_char<1)
return false;for(var i=1;i<object_value.length;i++)
{check_char=number_format.indexOf(object_value.charAt(i))
if(check_char<0)
return false;else if(check_char==1)
{if(decimal)
return false;else
decimal=true;}
else if(check_char==0)
{if(decimal||digits)
trailing_blank=true;}
else if(trailing_blank)
return false;else
digits=true;}
return true;}
function _CF_checkrange(object_value,min_value,max_value)
{if(object_value.length==0)
return true;if(!_CF_checknumber(object_value))
{return false;}
else
{return(_CF_numberrange((eval(object_value)),min_value,max_value));}
return true;}
function CheckDate(ThisForm,ThisObject,TheLength)
{var SameObject=TrimString(ThisObject.value);if(SameObject.length!=TheLength)
{return false}
if(!_CF_hasValue(ThisObject,"TEXT"))
{if(!_CF_onError(ThisForm,ThisObject,ThisObject.value,"Error in TestDate text."))
{return false;}}
if(!_CF_checkeurodate(ThisObject.value))
{if(!_CF_onError(ThisForm,ThisObject,ThisObject.value,"Error in TestDate text."))
{return false;}}
return true;}
function CheckCombo(MyObject)
{if(MyObject[MyObject.selectedIndex].value=='')
{return(false);}else{return true;}}
function CheckInteger(TheValue){MyNumber=TrimString(TheValue);if(isNaN(TheValue)||(MyNumber.length==0)){return false;}
if(parseFloat(TheValue)==parseInt(TheValue)){return true;}else{return false;}}
function CheckMLength(TheValue,MaxLength){if(TheValue.length>MaxLength){return false;}else{return true;}}
function CheckLength(TheValue,MaxLength){if(TheValue.length==MaxLength){return true;}else{return false;}}
function CheckIfNr(MyNumber){if(isNaN(MyNumber)){return false;}else{return true;}}
function CheckIfDble(MyNumber,SeparatorIndex){MyNumber=Replace(MyNumber,',','.')
if(isNaN(MyNumber)){return false;}
digitaftercoma=parseInt(MyNumber.length)-(parseInt(MyNumber.indexOf('.'))+1)
if(digitaftercoma!=SeparatorIndex){return false;}
return true;}
function isEmail(TheObject)
{TheDomSfx1=TheObject.slice(TheObject.length-3,TheObject.length);TheDomSfx2=TheObject.slice(TheObject.length-4,TheObject.length);if((TheDomSfx1.charAt(0)!='.')&&(TheDomSfx2.charAt(0)!='.'))
{return false}
TheObject.slice
if(TheObject=="")
{return false}
if(TheObject.indexOf('@',0)==-1||TheObject.indexOf('.',0)==-1)
{return false;}
return true;}
function CheckGroup(MyGroup,NrOfElement){var Flag=false;if(NrOfElement==1)
{if(MyGroup.checked==true)
{Flag=true;}}else{for(i=0;i<NrOfElement;i++)
{if(MyGroup[i].checked==true)
{Flag=true;}}}
if(Flag==false)
{return false;}else{return true;}}
function CheckField(Name,TheForm,FieldObject,CheckType,Required,MaxLength)
{var MyObject;var FormatCheck=true;var msgRequired,msgDate,msgInt,msgString1a,msgString1b,msgString2a;var msgString2b,msgNumber,msgEmail,msgSelect,msgConfirm1,msgConfirm2;if(Language=='en')
{msgRequired=' is required.\r\n';msgDate=' is not a valid date.(dd/mm/yyyy)\r\n';msgInt=' is not a valid integer.\r\n';msgString1a=' can not contain more than ';msgString1b=' characters.\r\n';msgString2=' must have a length of ';msgNumber=' is not a valid number.\r\n';msgEmail=' is not a valid e-mail adress.\r\n';msgSelect=' has to be selected.\r\n';msgDouble=' is not a valid decimal.\r\n';msgConfirm1='';msgConfirm2=' confirmation is invalid.\r\n';}
if(Language=='fr')
{msgRequired=' est obligatoire.\r\n';msgDate=' n\'est pas une date valide.(jj/mm/aaaa)\r\n';msgInt=' n\'est pas un entier.\r\n';msgString1a=' ne peut pas contenir plus de ';msgString1b=' charactères.\r\n';msgString2=' doit avoir une longueur de ';msgNumber=' n\'est pas un nombre valide.\r\n';msgEmail=' n\'est pas une adresse e-mail valide.\r\n';msgSelect=' dois être sélectionné.\r\n';msgDouble=' n\'est pas un décimal valable.\r\n';msgConfirm1='la confirmation du ';msgConfirm2=' est invalide.\r\n';}
if(Language=='nl')
{msgRequired=' is verplicht.\r\n';msgDate=' is geen geldig datum.\r\n';msgInt=' is geen geldig integer. .\r\n';msgString1a=' kan niet meer dan  ';msgString1b=' karakters bevatten.\r\n';msgString2=' moet een lengte hebben van ';msgNumber=' is geen geldig nummer.\r\n';msgEmail=' is geen geldig E-mail adres.\r\n';msgSelect=' moet geselecteerd worden.\r\n';msgDouble=' is geen geldig decimal.\r\n';msgConfirm1='fout bij ';msgConfirm2=' bevestiging.\r\n';}
if(Language=='sp')
{msgRequired=' es obligatorio.\r\n';msgDate=' no es una fecha válida (dd/mm/aaaa)';msgInt=' no es un número entero.\r\n';msgString1a=' no puede contener más de ';msgString1b=' caracteres.\r\n';msgString2=' debe tener una longitud de ';msgNumber=' no es un número válido.\r\n';msgEmail=' no es una dirección de correo electrónico válida.\r\n';msgSelect=' dois être sélectionné.\r\n';msgDouble=' no es un número válido.\r\n';msgConfirm1='la confirmación del ';msgConfirm2=' no es aceptable.\r\n';}
if(Language=='de')
{msgRequired=' unbedingt erforderlich.\r\n';msgDate=' ungültige Datumsangabe.(JJ/MM/JJ)\r\n';msgInt=' n\'est pas un entier.\r\n';msgString1a=' ne peut pas contenir plus de ';msgString1b=' charactères.\r\n';msgString2=' doit avoir une longueur de ';msgNumber=' n\'est pas un nombre valide.\r\n';msgEmail=' n\'est pas une adresse e-mail valide.\r\n';msgSelect=' dois être sélectionné.\r\n';msgDouble=' n\'est pas un décimal valable.\r\n';msgConfirm1='la confirmation du ';msgConfirm2=' est invalide.\r\n';}
if(MaxLength==-1){FormatCheck=false}
MyObject=TrimString(FieldObject.value);switch(CheckType){case'date':case'integer':case'string':case'string2':case'number':case'email':case'double':MyObject=TrimString(FieldObject.value);if((Required=='yes')&&(MyObject.length==0)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgRequired;FormatCheck=false;return false;}
if((Required=='no')&&(MyObject.length==0)){FormatCheck=false;}
break;case'select':FormatCheck=false;MyObject=TrimString(FieldObject[FieldObject.selectedIndex].value);if(MyObject==''){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgRequired;return false;}
break;case'radio':FormatCheck=false;if(!_CF_hasValue(FieldObject,'RADIO')){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgRequired;return false;}
break;case'group':FormatCheck=false;if(!CheckGroup(FieldObject,MaxLength)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgRequired;}
return CheckGroup(FieldObject,MaxLength);break;case'password':MyObject=TrimString(FieldObject.value)
if((Required=='yes')&&(MyObject.length==0)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgRequired;FormatCheck=false;return false;}
if((Required=='no')&&(MyObject.length==0)){FormatCheck=false;}
break;}
if(FormatCheck==true){switch(CheckType){case'date':if(!CheckDate(TheForm,FieldObject,MaxLength)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgDate;}
return CheckDate(TheForm,FieldObject,MaxLength);break;case'integer':if(!CheckInteger(FieldObject.value)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgInt;}
return CheckInteger(FieldObject.value);break;case'string':if(!CheckMLength(FieldObject.value,MaxLength)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgString1a+MaxLength+msgString1b;}
return CheckMLength(FieldObject.value,MaxLength);break;case'password':if(!CheckMLength(FieldObject.value,MaxLength)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgString1a+MaxLength+msgString1b;}
if(CheckMLength(FieldObject.value,MaxLength)){if(FieldObject.form.elements[String(FieldObject.name)+'Confirm']){if(FieldObject.form.elements[String(FieldObject.name)+'Confirm'].value!=FieldObject.value){GlobalMsg=GlobalMsg+msgConfirm1+Name+' '+msgConfirm2;return false;}else{return true;}}else{return true;}}else{return false;}
break;case'string2':if(!CheckLength(FieldObject.value,MaxLength)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgString2+MaxLength+'.\r';}
return CheckLength(FieldObject.value,MaxLength);break;case'number':if(!CheckIfNr(FieldObject.value)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgNumber;}
return CheckIfNr(FieldObject.value);break;case'email':if(!isEmail(FieldObject.value)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgEmail;}
return isEmail(FieldObject.value);break;case'double':if(!CheckIfDble(FieldObject.value,MaxLength)){GlobalMsg=GlobalMsg+'\''+Name+'\''+msgDouble;}
return CheckIfDble(FieldObject.value,MaxLength);break;}}
return true;}
function required(fvalue){if(TrimString(fvalue)=='')return(false);return(true);}
function CheckField2()
{if(Language=='en')
{var msgRequired=' is required.\r';var msgNrInterval=' should have a value included between ',msgNrInterval2=' and ';var msgTwins1='If \'',msgTwins2='\' is filled in, then \'',msgTwins3='\' has also to be filled in.\n';var msgOther1='If \'',msgOther2='\' is checked , then ',msgOther3a=' the field \'',msgOther3b=' the fields \'',msgOther4a='\' is required.\n',msgOther4b='\' are required.\n';var msgExclude1='If \'',msgExclude2='\' is filled in , then ',msgExclude3a=' the field \'',msgExclude3b=' the fields \'',msgExclude4a='\' must be empty.\n',msgExclude4b='\' must be empty.\n';}
if(Language=='fr')
{var msgRequired=' est obligatoire.\r';var msgNrInterval=' doit avoir une valeur comprise entre ',msgNrInterval2=' et ';var msgTwins1='Si \'',msgTwins2='\' est rempli, alors \'',msgTwins3='\' doit être aussi rempli.\n';var msgOther1='Si \'',msgOther2='\' est coché , alors ',msgOther3a=' le champ \'',msgOther3b=' les champs \'',msgOther4a='\' est requis.\n',msgOther4b='\' sont requis.\n';var msgExclude1='Si \'',msgExclude2='\' est rempli , alors ',msgExclude3a=' le champ \'',msgExclude3b=' les champs \'',msgExclude4a='\' doit être vide.\n',msgExclude4b='\' doivent être vides.\n';}
if(Language=='nl')
{var msgRequired=' is verplicht.\r';var msgNrInterval=' het veld moet een waarde hebben tussen ',msgNrInterval2=' en ';}
switch(arguments[0])
{case'nr_interval':var fval=eval('frm.'+arguments[2]+'.value');if(arguments[5]=='required'&&!required(fval))
{GlobalMsg+='\''+arguments[1]+'\''+msgRequired;return(false);}
if(required(fval)&&(fval<arguments[3]||fval>arguments[4]||!CheckIfNr(fval)))
{GlobalMsg+='\''+arguments[1]+'\''+msgNrInterval+arguments[3]+msgNrInterval2+arguments[4]+'. \r';return(false);}
return(true);break;case'twins':var fld1=eval('frm.'+arguments[2]+'.value');var fld2=eval('frm.'+arguments[4]+'.value');if(required(fld1)&&!required(fld2)){GlobalMsg+=msgTwins1+arguments[1]+msgTwins2+arguments[3]+msgTwins3;return false;}
if(!required(fld1)&&required(fld2)){GlobalMsg+=msgTwins1+arguments[3]+msgTwins2+arguments[1]+msgTwins3;return false;}
return(true);break;case'other':var fld1=eval('frm.'+arguments[2]+'.checked==true');var fld2=eval('frm.'+arguments[4]+'.value');var count=0;var flds='';if(fld1)
{if(!required(fld2))
{count+=1;flds+=arguments[3];}
if((arguments.length>5)&&(parseInt(arguments.length)%2==1))
{for(var i=5;i<(arguments.length-1);i=i+2)
{var myval=eval('frm.'+arguments[i+1]+'.value');if(!required(myval))
{count+=1;if(count>1)flds+=', ';flds+=arguments[i];}}}
if(count==1){GlobalMsg+=msgOther1+arguments[1]+msgOther2+msgOther3a+flds+msgOther4a;return(false);}
if(count>1){GlobalMsg+=msgOther1+arguments[1]+msgOther2+msgOther3b+flds+msgOther4b;return(false);}}
return(true);break;case'exclude':var fld1=eval('frm.'+arguments[2]+'.value');var fld2=eval('frm.'+arguments[4]+'.value');var count=0;var flds='';if(required(fld1))
{if(required(fld2))
{count+=1;flds+=arguments[3];}
if((arguments.length>5)&&(parseInt(arguments.length)%2==1))
{for(var i=5;i<(arguments.length-1);i=i+2)
{var myval=eval('frm.'+arguments[i+1]+'.value');if(required(myval))
{count+=1;if(count>1)flds+=', ';flds+=arguments[i];}}}
if(count==1){GlobalMsg+=msgExclude1+arguments[1]+msgExclude2+msgExclude3a+flds+msgExclude4a;return(false);}
if(count>1){GlobalMsg+=msgExclude1+arguments[1]+msgExclude2+msgExclude3b+flds+msgExclude4b;return(false);}}
return(true);break;case'url':myval=eval('frm.'+arguments[2]+'.value');myval=TrimString(myval);if(myval.slice(0,11)=='http://www.')var cnd1=true;if(myval.slice(0,7)=='http://')var cnd2=true;if(myval.slice(0,4)=='www.')var cnd3;for(i=0;i<myval.length;i++)
{if((myval.charAt(i)=='/')&&i!=5&&i!=6){var slash=i;break;}}
alert(slash)
DomSfx1=myval.slice(slash,slash+3);DomSfx2=myval.slice(slash,slash+4);if((DomSfx1.charAt(0)=='.')||(DomSfx2.charAt(0)=='.'))cnd4=true;var cnd5=0;for(i=0;i<myval.length;i++)
{if(myval.charAt(i)=='.')cnd5+=1;}
if((arguments[3]!='h'))
{if(!((cnd1==true||cnd2==true||cnd3==true)&&cnd4==true&&(cnd5==1||cnd5==2)))
{alert('bad adress');}}
return true;break;}}