var _test; function myTest(myVar1, myVar2, selectedItems) { str=""; for(i=0; i < selectedItems.length; i++) { str=str+"MultiObjectGuid="+selectedItems[i]+"&"; } window.open("webform1.aspx?myvar1="+myVar1+"&myvar2="+myVar2+"&"+str,"testwin","height=300, width=300, left=10, top=10, location=no, menubar=no, status=no, toolbar=no, resizable=yes"); } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //------------------OTHER FUNCTIONS------------------------------------ //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Copies the value of field checkBoxControl to fields controlsArray function SwapImages(image1UniqueId, image2UniqueId) { temp = document.forms[0].elements[image1UniqueId].src; document.forms[0].elements[image1UniqueId].src = document.forms[0].elements[image2UniqueId].src; document.forms[0].elements[image2UniqueId].src = temp; } //Copies the value of field checkBoxControl to fields controlsArray function FillControls(textBoxControl, textBoxControlsArray) { for(x=0; x < textBoxControlsArray.length; x++) { if(document.forms[0].elements[textBoxControlsArray[x]] != null && document.forms[0].elements[textBoxControl] != null) document.forms[0].elements[textBoxControlsArray[x]].value = document.forms[0].elements[textBoxControl].value; } } //Calculate a difference between maxLength and textField.length //and put it to the counterField function ChangeTextCounter(maxLength, textField, counterField) { document.all(counterField).innerText = maxLength - document.forms[0].elements[textField].value.length; if(document.forms[0].elements[textField].value.length > maxLength) document.forms[0].elements[textField].value = document.forms[0].elements[textField].value.substr(0,maxLength); } //Clear content of input type=text, password, hidden fields function ClearFields(fieldsToClear, form) { if(form != null) _form = form; else _form = document.forms[0]; for(i=0; i < fieldsToClear.length; i++) { if(_form.elements[fieldsToClear[i]] != null) { if(_form.elements[fieldsToClear[i]].type == "select-multiple" || _form.elements[fieldsToClear[i]].type == "select-one") _form.elements[fieldsToClear[i]].selectedIndex = 0; else _form.elements[fieldsToClear[i]].value = ""; } else { if( _form.document.all(fieldsToClear[i]) != null ) _form.document.all(fieldsToClear[i]).innerText = ""; } } } //Hide unhide a table row and change image icon function HideUnhideRow(rowName, imageName, expandedImageUrl, collapsedImageUrl, stateField) { if(document.all(rowName).style.display == "none") { document.all(rowName).style.display = "block"; if(imageName != null) document.images(imageName).src=expandedImageUrl; if(stateField != null) document.forms[0].elements[stateField].value = "true"; } else { document.all(rowName).style.display = "none"; if(imageName != null) document.images(imageName).src=collapsedImageUrl; if(stateField != null) document.forms[0].elements[stateField].value = "false"; } } //Enables or disables controls by clicking a checkbox control function EnableDisableControls(checkBoxControl, controlsArray) { for(i=0; i < controlsArray.length; i++) { if(document.forms[0].elements[checkBoxControl].checked) document.forms[0].elements[controlsArray[i]].disabled = false; else document.forms[0].elements[controlsArray[i]].disabled = true; } } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //---------------MULTISELECT CONTROLS SUPPORT FUNCTIONS---------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- function CheckUncheckAll(masterCheckBox, checkBoxesToCheckUniqueIdPart) { for(i = 0; i < document.forms[0].elements.length; i++) { if(document.forms[0].elements[i].type == 'checkbox' && document.forms[0].elements[i].name.indexOf(checkBoxesToCheckUniqueIdPart) != -1 && document.forms[0].elements[i].name != masterCheckBox.name) { document.forms[0].elements[i].checked = masterCheckBox.checked; } } } function SelectedItemsCreate(uniqueId, itemsName) { itemsArray = []; for(i=0; i < document.forms[0].elements.length; i++) { if(document.forms[0].elements[i].name.indexOf(uniqueId+":"+itemsName) != -1) { if(document.forms[0].elements[i].checked) { itemsArray[itemsArray.length] = document.forms[0].elements[i].value; } } } return itemsArray; } function CheckSelectedItems(ControlSelectedItems) { if(ControlSelectedItems.length > 0) return true; else { alert("Merci de sélectionner au moins un object"); return false; } } function ConfirmItemsDelete(eventTarget, eventArgument, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) { if(confirm("Etes-vous sûr de vouloir supprimer les objects sélectionnés?")) { __doPostBack(eventTarget, eventArgument); } } } function SelectedItemsDoPostBack(eventTarget, eventArgument, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) __doPostBack(eventTarget, eventArgument); } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //----------------MINMAXEDITOR SUPPORT FUNCTIONS------------------------ //--------------------------------------------------------------------- //--------------------------------------------------------------------- MinMaxFieldsToCheck = []; function MinMaxEditor_check(source, arguments) { form = document.forms[0]; for(i=0; i< MinMaxFieldsToCheck.length;i++) { if (new Number(form.elements[MinMaxFieldsToCheck[i][0]].value) > new Number(form.elements[MinMaxFieldsToCheck[i][1]].value)) { alert('La valeur maximum doit être supérieure à la valeur minimum : '+MinMaxFieldsToCheck[i][2]+' '); form.elements[MinMaxFieldsToCheck[i][1]].focus(); arguments.IsValid = false; return false; } } arguments.IsValid = true; return true; } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //----------------PRICEEDITOR SUPPORT FUNCTIONS------------------------ //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Initializes arrays for fields to check FieldsToCheck_PriceEditor = []; function PriceEditor_CurrencyChange(uniqueId) { var newValue; for(i=0; i < document.forms[0].elements.length; i++) if(document.forms[0].elements[i].name.indexOf(uniqueId+":currencySelect") == 0) newValue = document.forms[0].elements[i].options[document.forms[0].elements[i].selectedIndex].text; for(i=0; i < document.forms[0].elements.length; i++) if(document.forms[0].elements[i].name.indexOf(uniqueId+":currencyView") == 0) document.forms[0].elements[i].value = newValue; } function PriceEditorCard_check(source, arguments) { //---Realise the standard checks--------- var FieldsToCheck_temp = FieldsToCheck; FieldsToCheck = FieldsToCheck_PriceEditor; if (!EditCard_check(source, arguments)) { FieldsToCheck = FieldsToCheck_temp; arguments.IsValid = false; return false; } FieldsToCheck = FieldsToCheck_temp; //---------------------------------------- for (i = 0; i < FieldsToCheck_PriceEditor.length; i += 3) { if( document.forms[0].elements[FieldsToCheck_PriceEditor[i][0]].id.indexOf(':min_') > 0 && document.forms[0].elements[FieldsToCheck_PriceEditor[i][0]].id.indexOf(':max_') > 0 ) { var _min = new Number(document.forms[0].elements[FieldsToCheck_PriceEditor[i][0]].value); var _max = new Number(document.forms[0].elements[FieldsToCheck_PriceEditor[i + 1][0]].value); if (_max != 0 && _min > _max) { alert('La valeur maximum doit être supérieure à la valeur minimum : "'+FieldsToCheck_PriceEditor[i+1][1]+'"'); form.elements[FieldsToCheck_PriceEditor[i+1][0]].focus(); arguments.IsValid = false; return false; } } } // for (i = 0; i < FieldsToCheck_PriceEditor.length - 3; i += 3) // { // var _min = new Number(document.forms[0].elements[FieldsToCheck_PriceEditor[i][0]].value); // var _max = new Number(document.forms[0].elements[FieldsToCheck_PriceEditor[i + 1][0]].value); // var _minNext = new Number(document.forms[0].elements[FieldsToCheck_PriceEditor[i + 3][0]].value); // if (_max == 0 || _max > _minNext) // { // alert('L\'intersection des plages quantitatives'); // form.elements[FieldsToCheck_PriceEditor[i + 1][0]].focus(); // arguments.IsValid = false; // return false; // } // } } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //------------------TREEVIEW SUPPORT FUNCTIONS------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Checks all checkboxes of the control specified by uniqueId function TreeView_CheckUncheckAll(masterCheckBox, checkBoxesToCheckUniqueIdPart) { for(i = 0; i < document.forms[0].elements.length; i++) { if(document.forms[0].elements[i].name.indexOf(checkBoxesToCheckUniqueIdPart) != -1) { document.forms[0].elements[i].checked = masterCheckBox.checked; } } } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //----------------CALENDAR SUPPORT FUNCTIONS--------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- function Calendar_HiddenChange(CalendarID) { dataTimeString = document.forms[0].elements[CalendarID+':Calendar_Value'].value; if(dataTimeString != "") { dateTimeArray = dataTimeString.split(' '); var dateArray, timeArray; if(dateTimeArray[0] != null) dateArray = dateTimeArray[0].split('/'); if(dateTimeArray[1] != null) timeArray = dateTimeArray[1].split(':'); if(document.forms[0].elements[CalendarID+':CalendarListBox_Day'] != null) document.forms[0].elements[CalendarID+':CalendarListBox_Day'].value = parseInt(dateArray[0]*1); if(document.forms[0].elements[CalendarID+':CalendarListBox_Month'] != null) document.forms[0].elements[CalendarID+':CalendarListBox_Month'].value = parseInt(dateArray[1]*1); if(document.forms[0].elements[CalendarID+':CalendarListBox_Year'] != null) document.forms[0].elements[CalendarID+':CalendarListBox_Year'].value = dateArray[2]; if(document.forms[0].elements[CalendarID+':CalendarListBox_Hour'] != null) document.forms[0].elements[CalendarID+':CalendarListBox_Hour'].value = timeArray[0]; if(document.forms[0].elements[CalendarID+':CalendarListBox_Minute'] != null) document.forms[0].elements[CalendarID+':CalendarListBox_Minute'].value = timeArray[1]; if(document.forms[0].elements[CalendarID+':Calendar_TextBox'] != null) document.forms[0].elements[CalendarID+':Calendar_TextBox'].value = dateArray[0]+"/"+dateArray[1]+"/"+dateArray[2]; } else { if(document.forms[0].elements[CalendarID+':CalendarCheckBox'] != null) document.forms[0].elements[CalendarID+':CalendarCheckBox'].checked = false; if(document.forms[0].elements[CalendarID+':Calendar_TextBox'] != null) document.forms[0].elements[CalendarID+':Calendar_TextBox'].value = ""; } } function Calendar_DateChange(CalendarID) { var year,month,day,hour=0,minute=0; var daycount; if(document.forms[0].elements[CalendarID+':CalendarListBox_Day'] != null) day = document.forms[0].elements[CalendarID+':CalendarListBox_Day'].value; if(document.forms[0].elements[CalendarID+':CalendarListBox_Month'] != null) month = document.forms[0].elements[CalendarID+':CalendarListBox_Month'].value; if(document.forms[0].elements[CalendarID+':CalendarListBox_Year'] != null) year = document.forms[0].elements[CalendarID+':CalendarListBox_Year'].value; if(document.forms[0].elements[CalendarID+':CalendarListBox_Minute'] != null) minute = document.forms[0].elements[CalendarID+':CalendarListBox_Minute'].value; if(document.forms[0].elements[CalendarID+':CalendarListBox_Hour'] != null) hour = document.forms[0].elements[CalendarID+':CalendarListBox_Hour'].value; document.forms[0].elements[CalendarID+':Calendar_Value'].value = day+"/"+month+"/"+year+" "+hour+":"+minute; if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) daycount = 31; if (month == 4 || month == 6 || month == 9 || month == 11) daycount = 30; if (month == 2 && year % 4 == 0) daycount = 29; if (month == 2 && year % 4 != 0) daycount = 28; if (day >= daycount) { document.forms[0].elements[CalendarID+':CalendarListBox_Day'].value = daycount; document.forms[0].elements[CalendarID+':Calendar_Value'].value = daycount+"/"+month+"/"+year+" "+hour+":"+minute; } /* if (document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.length > daycount) { while (document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.length > daycount) { document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.remove(document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.length - 1) } if (day >= daycount) document.forms[0].elements[CalendarID+':CalendarListBox_Day'].value = daycount; } while(document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.length < daycount) { var oOption = document.createElement("OPTION"); document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.add(oOption); oOption.innerText = document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.length; oOption.value = document.forms[0].elements[CalendarID+':CalendarListBox_Day'].options.length; } */ /* for(i=0; i < document.forms[0].elements.length; i++) { if(document.forms[0].elements[i].name.indexOf(uniqueId+":CalendarListBox_Day") == 0) { if (document.forms[0].elements[i].options.length > daycount) { while (document.forms[0].elements[i].options.length > daycount) document.forms[0].elements[i].options.remove(document.forms[0].elements[i].options.length - 1) if (day >= daycount) document.forms[0].elements[i].value = daycount; } while (document.forms[0].elements[i].options.length < daycount) { var oOption = document.createElement("OPTION"); document.forms[0].elements[i].options.add(oOption); oOption.innerText = document.forms[0].elements[i].options.length; oOption.value = document.forms[0].elements[i].options.length; } } } */ } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //-------------TABLE VIEW SUPPORT FUNCTIONS---------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Checks all checkboxes of TableView control specified by uniqueId function TableView_SelectAll(uniqueId) { flag = false; for(i1 = 0; i1 < document.forms[0].elements.length; i1++) { if(document.forms[0].elements[i1].name.indexOf(uniqueId+":SelectAllItems") != -1) { if (document.forms[0].elements[i1].checked) flag = true; } } for(i2 = 0; i2 < document.forms[0].elements.length; i2++) { if(document.forms[0].elements[i2].name.indexOf(uniqueId+":TableViewItem") != -1) { if (flag != document.forms[0].elements[i2].checked) document.forms[0].elements[i2].click(); } } } function TableView_MarkRow(tableViewUniqueID, rowIndex) { _table = document.all(tableViewUniqueID+"_"+rowIndex).parentElement; for(i=1; i<_table.rows.length; i++) { for(j=0; j<_table.rows[i].cells.length; j++) { if( document.all(tableViewUniqueID+"_"+(i-1)+"_"+j) != null ) { if(i-1 == rowIndex) { _table.rows[i].cells[j].bgColor = _table.rows[i].cells[j].style.backgroundColor; _table.rows[i].cells[j].style.backgroundColor = "#CCCC99"; } else { if(_table.rows[i].cells[j].bgColor != "") _table.rows[i].cells[j].style.backgroundColor = _table.rows[i].cells[j].bgColor; } } } } } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //---------------CONFIRM DIALOG FUNCTIONS------------------------------ //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Logout confirm dialog function ConfirmLogout() { if(confirm("Etes-vous sûr de vouloir vous déconnecter? ")) { __doPostBack('LogoutLinkButton',''); } } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //-----------------WINDOWS MANAGEMENT FUNCTIONS------------------------ //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Array of opened windows Windows_OpenedWindows = []; //Close all oppened windows function windows_CloseAll() { //alert(Windows_OpenedWindows.length); for(i=0; i < Windows_OpenedWindows.length; i++) { if(!Windows_OpenedWindows[i].closed)Windows_OpenedWindows[i].close(); } } //Open a window; function window_open(wurl,wname,wwidth,wheight,wtop,wleft) { var _window = window.open(wurl,wname,"height="+wheight+", width="+wwidth+", left="+wleft+", top="+wtop+", location=no, menubar=no, status=no, toolbar=no, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open AllowedCustomsCodes edit window; function AllowedCustomsCodesEdit_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=d80bbde2-8ddd-4991-b3eb-ebedf9e81ad2&EventTarget="+EventTarget+" ","AllowedCustomsCodesEdit","height=200, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open FairFolderReport edit window; function ProductReportEdit_open(eventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=ca7a2fbd-f9db-4924-869f-a80de43e3800&EventTarget="+eventTarget+" ","ProductReportEdit","height=600, width=600, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ECSDataExchangeImport_edit window; function ECSDataExchangeImportEdit_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=8864056f-fbef-4ab5-bda5-7f1867553c9c&EventTarget="+EventTarget+" ","ECSDataExchangeImportEdit","height=600, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ECSPackOrder_view window; function ECSPackOrderView_open(ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=10883c2b-6268-4830-8422-fb1c0e44b885&ObjectGuid="+ObjectGuid+" ","ECSPackOrderView","height=650, width=650, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ECSPackOrder_edit window; function ECSPackOrderEdit_open(EventTarget,ObjectGuid, ObjectAction) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=fb550906-342d-4122-b05c-b013e8fc6fa0&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+"&ObjectAction="+ObjectAction+" ","ECSPackOrderEdit","height=600, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ECSTenderNoResponse edit window; function ECSTenderNoResponseEdit_open(EventTarget, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) { document.forms[0].elements['SelectedTenders'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=251696fa-1916-4903-a206-c07a42e81249&EventTarget="+EventTarget+" ","ECSTenderNoResponseEdit","height=550, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } //Open DataExchangeMessage view window; function DataExchangeMessageView_open(DataExchangeMessageGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=37dc7838-91a7-4a88-9abe-0fbe7d9689b9&DataExchangeMessageGuid="+DataExchangeMessageGuid,"DataExchangeMessageView","height=700, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open SalePoint select window; function SalePointSelect_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=1aaddfc4-a11b-43aa-8592-38f893443a3a&EventTarget="+EventTarget+" ","SalePointSelect","height=600, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Retailer select window; function RetailerSelect_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=7e63a05c-08c1-46c3-97ca-16f1bf711505&EventTarget="+EventTarget+" ","RetailerSelect","height=550, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open SharingPermission edit window; function SharingPermissionEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrObjectGuidProduct, OPtrObjectGuidUser, OPtrObjectGuidUserClass) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=79ab227e-d900-4ac8-ba21-ff891d03faa1&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrObjectGuidProduct="+OPtrObjectGuidProduct+"&OPtrObjectGuidUser="+OPtrObjectGuidUser+"&OPtrObjectGuidUserClass="+OPtrObjectGuidUserClass+" ","SharingPermission","height=500, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open SenderReceiver window; function SenderReceiver_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=a4b3ddc9-85e7-4d6f-8dec-d610fa46f240&EventTarget="+EventTarget,"SenderRceiver","height=400, width=450, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open PortalB2C InvitationMail window; function PortalB2CInvitationMail_open() { var _window = window.open("page_portalB2C.aspx?IsWindow=true&MainControlGuid=0ef18d82-6efc-41ff-8aa5-d08c0dd0e834","PortalB2CInvitationMail","height=600, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open PortalB2C Product view window; function PortalB2CProductView_open(EventTarget,ProductGuid) { var _window = window.open("page_portalB2C.aspx?IsWindow=true&MainControlGuid=647eed02-3913-4656-b307-a3ab04c2f945&EventTarget="+EventTarget+"&ProductGuid="+ProductGuid,"PortalB2CProductView","height=700, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open PortalB2C UserCGU view window; function PortalB2CUserCGUView_open() { var _window = window.open("page_portalB2C.aspx?IsWindow=true&MainControlGuid=a5cf460c-e0c9-4983-9898-fe1387dfaea5","PortalB2CUserCGUView","height=600, width=500, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open CodeGtinCreate edit window; function CodeGtinCreate_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={5a9b313e-234a-4899-8b91-8429afb1c375}&EventTarget="+EventTarget,"CodeGtinCreate","height=200, width=300, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open TenderView window; function TenderView_open(ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C307FE44-AC6D-45BB-86B6-698380AA114A}&ObjectGuid="+ObjectGuid+" ","invoiceview","height=600, width=700, left=30, top=30, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open TenderSelect list window; function TenderSelect_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={BFD4B639-C55B-4044-A9DB-434A31BBB01A}&EventTarget="+EventTarget,"TenderSelect","height=400, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open FairFolderReport edit window; function FairFolderReportEdit_open(eventTarget, fairFolderGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={DFAC7AB6-3A0A-481B-9D6F-FBCDE3E78173}&EventTarget="+eventTarget+"&FairFolderGuid="+fairFolderGuid+" ","FairFolderReportEdit","height=350, width=500, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ProductRate edit window; function ProductRateEdit_open(EventTarget, FairFolderGuid, FairParticipantGuid, AvailabilityType, ReservationType, ControlSelectedItems, ProductIDs, CodeGtins, SortOrderGuid) { if( (ControlSelectedItems != null && CheckSelectedItems(ControlSelectedItems)) || ControlSelectedItems == null) { if( ControlSelectedItems != null && CheckSelectedItems(ControlSelectedItems) ) document.forms[0].elements['SelectedProducts'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={0D6426E1-4695-4A0E-96B6-CF54D285C546}&EventTarget="+EventTarget+"&FairFolderGuid="+FairFolderGuid+"&FairParticipantGuid="+FairParticipantGuid+"&AvailabilityType="+AvailabilityType+"&ReservationType="+ReservationType+"&ProductIDs="+ProductIDs+"&CodeGtins="+CodeGtins+"&SortOrderGuid="+SortOrderGuid+" ","ProductRateEdit","height=450, width=700, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } //Open FairReservation edit window; function FairReservationEdit_open(EventTarget, IsReservationByRegion, FairFolderGuid, FairParticipantGuid, AvailabilityType, ReservationType, ControlSelectedItems, ProductIDs, CodeGtins, SortOrderGuid) { if( (ControlSelectedItems != null && CheckSelectedItems(ControlSelectedItems)) || ControlSelectedItems == null) { if( ControlSelectedItems != null && CheckSelectedItems(ControlSelectedItems) ) document.forms[0].elements['SelectedProducts'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={A72EA032-012A-4719-BEDA-C29AF715AB31}&EventTarget="+EventTarget+"&IsReservationByRegion="+IsReservationByRegion+"&FairFolderGuid="+FairFolderGuid+"&FairParticipantGuid="+FairParticipantGuid+"&AvailabilityType="+AvailabilityType+"&ReservationType="+ReservationType+"&ProductIDs="+ProductIDs+"&CodeGtins="+CodeGtins+"&SortOrderGuid="+SortOrderGuid+" ","FairReservationEdit","height=450, width=700, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } //Open ProductToFairParticipant edit window; function ProductToFairParticipantEdit_open(EventTarget, FairFolderGuid, FairParticipantGuid, AvailabilityType, ReservationType, ControlSelectedItems) { if( (ControlSelectedItems.length > 0 && CheckSelectedItems(ControlSelectedItems)) || ControlSelectedItems.length == 0) { if( ControlSelectedItems.length > 0 && CheckSelectedItems(ControlSelectedItems) ) document.forms[0].elements['SelectedProducts'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={91B93AA6-8359-40E1-B768-CF0BC016CACC}&EventTarget="+EventTarget+"&FairFolderGuid="+FairFolderGuid+"&FairParticipantGuid="+FairParticipantGuid+"&AvailabilityType="+AvailabilityType+"&ReservationType="+ReservationType+" ","ProductToFairParticipantEdit","height=450, width=400, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } //Open FairParticipant edit window; function FairParticipantEdit_open(EventTarget, ObjectAction, ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={2987C5FB-45BC-42F4-9F15-60F148CA168E}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+" ","FairFolderEdit","height=200, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open FairFolder edit window; function FairFolderEdit_open(EventTarget, ObjectAction, ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={9E772661-08A5-4C94-837B-F6E7A6196D6E}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+" ","FairFolderEdit","height=200, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ProductSelectTreeView_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={FF79F38E-5EEE-4A03-80B1-8D95A16A32CE}&EventTarget="+EventTarget,"ULProduct","height=550, width=400, left=100, top=100, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ProductSelectTableView_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={6CF84EAC-11C7-4137-A17C-CD7C6BC765F9}&EventTarget="+EventTarget,"ULProduct","height=550, width=500, left=100, top=100, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Tender supplier edit window; function TenderSupplierEdit_open(EventTarget, ObjectAction, OPtrSessionName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={0623CCD1-7372-4BEB-8ABD-5EFB2932B592}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","TenderSupplierEdit","height=400, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ReferenceEdit list window; function ReferenceEdit_open(EventTarget, ObjectAction, OPtrSessionName, OPtrObjectGuid, loadDesadvReferenceTypes, loadOrderReferenceTypes, loadInvoiceReferenceTypes) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={DCC4DE87-791D-498D-A480-CCC3DF2C6F03}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrObjectGuid="+OPtrObjectGuid+"&loadDesadvReferenceTypes="+loadDesadvReferenceTypes+"&loadOrderReferenceTypes="+loadOrderReferenceTypes+"&loadInvoiceReferenceTypes="+loadInvoiceReferenceTypes+" ","referenceEdit","height=200, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open AllowanceOrCharge edit window; function AllowanceOrChargeEdit_open(EventTarget, ObjectAction, OPtrSessionName, OPtrObjectNumber) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={3010379B-5FB8-4371-ACB7-3FE2B2329CAD}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrObjectNumber="+OPtrObjectNumber+" ","AllowanceOrChargeEdit","height=200, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function InvoiceReport_open(InvoiceReportType) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={6336427D-AC8B-4394-98BB-647A9D741E1E}&InvoiceReportType="+InvoiceReportType+" ", "invoicereport","height=300, width=450, left=10, top=10, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function InvoiceView_open(ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={28031FE5-C257-4193-90A7-2BED190D9742}&ObjectGuid="+ObjectGuid+" ","invoiceview","height=700, width=750, left=10, top=10, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function InvoiceItemView_open(OPtrSessionName, OPtrObjectNumber, CurrencyGuid, wNumber) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={09FAAC81-AFEC-4F6D-94C9-A665106C3BCA}&OPtrSessionName="+OPtrSessionName+"&OPtrObjectNumber="+OPtrObjectNumber+"&CurrencyGuid="+CurrencyGuid+" ","InvoiceView"+wNumber,"height=450, width=550, left=10, top=10, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function InvoiceItemEdit_open(EventTarget, ObjectAction, OPtrSessionName, OPtrObjectNumber, CurrencyGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C24D14B7-0EF4-4A79-981D-951C8421EC73}&EventTarget="+EventTarget+"&ObjectAction="+ObjectAction+"&OPtrObjectNumber="+OPtrObjectNumber+"&OPtrSessionName="+OPtrSessionName+"&CurrencyGuid="+CurrencyGuid+" ","InvoiceItem" + EventTarget,"height=600, width=700, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function Calendar_open(ValueFieldID) { DateValue = document.forms[0].elements[ValueFieldID].value; var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={D14D76BA-1828-4B84-834F-C0449CF32A9D}&ValueFieldID="+ValueFieldID+"&DateValue="+DateValue+" ","Calendar","height=200, width=250, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open FirmInvoiceDate edit window; function FirmInvoiceDateEdit_open(EventTarget, ObjectAction, OPtrSessionName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={225BD6D4-7F42-4A30-A137-B26949089EDB}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","FirmInvoiceDate","height=200, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function FirmEdit_open(EventTarget, ObjectAction, ObjectGuid, IsAdminMode, SendToParent) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={65D75080-E02B-4C06-BAE5-D8209D08AF62}&EventTarget="+EventTarget+"&ObjectAction="+ObjectAction+"&ObjectGuid="+ObjectGuid+"&IsAdminMode="+IsAdminMode+"&SendToParent="+SendToParent+" ","FirmEdit" + EventTarget,"height=640, width=640, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function DesadvItemView_open(EventTarget, OPtrObjectGuid, OPtrSessionName, IsTopLevel, OPtr2SessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={01A60180-5D54-479E-9C87-1C8C16B41BE5}&EventTarget="+EventTarget+"&OPtrObjectGuid="+OPtrObjectGuid+"&OPtrSessionName="+OPtrSessionName+"&IsTopLevel="+IsTopLevel+"&OPtr2SessionName="+OPtr2SessionName+" ","DesadvItem" + EventTarget,"height=500, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function DesadvView_open(OPtrSessionName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={CBF018F7-F9DA-422b-B035-26E40D1E48AD}&OPtrSessionName="+OPtrSessionName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","desadvview","height=700, width=650, left=10, top=10, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ClassificationGPC list window; function ClassificationGPCList_open(ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={A40401FA-D081-4E81-9CB3-D4C583CECD26}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+" ","ClassificationGPC","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open BarCodeGeneratorEdit_open edit window; function BarCodeGeneratorEdit_open() { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={13C420E9-68C9-4713-A051-56AA31C5D56A}","BarCodeGenerator","height=300, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ClassificationAuchanList_open list window; function ClassificationAuchanList_open(ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={01DA1957-80E8-4547-89E9-274BC422584F}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+" ","classificationAuchan","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function CommerceLogisticLabelEdit_open(EventTarget, ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={34193160-5E38-4EC4-B073-DA6C790ABD89}&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+" ","CommerceLogisticLabel","height=400, width=550, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function CommerceInvoiceArchive_open(EventTarget, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) { if(document.forms[0].elements['SelectedInvoices'] != null) document.forms[0].elements['SelectedInvoices'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C28445CE-9084-4FC3-B861-13EC54966BA4}&EventTarget="+EventTarget,"CommerceInvoiceArchive","height=400, width=550, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } function CommerceDataExchange_open(EventTarget, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) { if(document.forms[0].elements['SelectedDesadvs'] != null) document.forms[0].elements['SelectedDesadvs'].value = ControlSelectedItems.join(';'); if(document.forms[0].elements['SelectedInvoices'] != null) document.forms[0].elements['SelectedInvoices'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={2049F319-38F3-4A42-9DA6-B808A0E5BA33}&EventTarget="+EventTarget,"CommerceDataExchange","height=400, width=550, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } function X400MessageView_open(EventTarget, ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={8B620737-8985-4747-8EAB-F6DBD1B79932}&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+" ","X400Message","height=500, width=550, left=100, top=100, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ProductSelect_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={6CF84EAC-11C7-4137-A17C-CD7C6BC765F9}&EventTarget="+EventTarget,"ULProduct","height=550, width=400, left=100, top=100, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function GlnAddressBookEdit_open(EventTarget, ObjectAction) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={AF973200-4FFC-4A3E-BAD7-89447D1DE95B}&EventTarget="+EventTarget+"&ObjectAction="+ObjectAction,"GlnAddressBook","height=550, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function GlnAddressBookItemEdit_open(EventTarget, ObjectAction, ObjectGuid, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={FF5A5F5B-9C8B-4fa9-BC2F-3FE1FCFEE7E2}&EventTarget="+EventTarget+"&ObjectAction="+ObjectAction+"&ObjectGuid="+ObjectGuid+"&OPtrSessionName="+OPtrSessionName,"GlnAddressBookItem","height=250, width=500, left=100, top=100, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function DesadvItemEditTracabilityTable_open(EventTarget, LotNumIsMarked, SsccIsMarked, Quantity) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={4A449D7A-01AD-49f6-A9F4-AD18CF00EA6B}&EventTarget="+EventTarget+"&LotNumIsMarked="+LotNumIsMarked+"&SsccIsMarked="+SsccIsMarked+"&Quantity="+Quantity,"Tracabilities","height=500, width=550, left=100, top=100, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function DesadvItemEdit_open(EventTarget, ObjectAction, OPtrObjectGuid, OPtrSessionName, IsTopLevel, OPtr2SessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={D2DAFDCA-DA70-4D0A-B17B-9EC61BA74231}&EventTarget="+EventTarget+"&ObjectAction="+ObjectAction+"&OPtrObjectGuid="+OPtrObjectGuid+"&OPtrSessionName="+OPtrSessionName+"&IsTopLevel="+IsTopLevel+"&OPtr2SessionName="+OPtr2SessionName+" ","DesadvItem" + EventTarget,"height=500, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //ProductCopyToFolder edit function ProductToFairFolderEdit_open(EventTarget, ObjectAction, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) { document.forms[0].elements['SelectedProducts'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={776602E1-8A26-40BF-9673-AC6854DC6B6F}&EventTarget="+EventTarget+"&ObjectAction="+ObjectAction+" ","ProductCopyToFolder","height=450, width=650, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } //Product filter edit function ProductFilterEdit_open(EventTarget, ProductSearchCriteriaSessionName, AllowedProductTypesString, AllowedProductFormatsString) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=1ccf4b5e-347b-4bcd-9d3f-cb444c38aeab&EventTarget="+EventTarget+"&ProductSearchCriteriaSessionName="+ProductSearchCriteriaSessionName+"&AllowedProductTypesString="+AllowedProductTypesString+"&AllowedProductFormatsString="+AllowedProductFormatsString+" ","ProductFilterEdit","height=550, width=600, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //ECSCommerceOrder view function ECSCommerceOrderView_open(eventTarget,objectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={1A6B520D-2321-4B63-8B96-C707A839A3FB}&EventTarget="+eventTarget+"&ObjectGuid="+objectGuid,"commerceorderview","height=550, width=650, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //ComponentInfo edit function ComponentInfoEdit_open(eventTarget,action,objectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={7956505E-9D84-4524-A7AC-EDA4CE5896D9}&EventTarget="+eventTarget+"&ObjectAction="+action+"&ObjectGuid="+objectGuid,"componentinfoedit","height=550, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open WineTastingRobe list window; function WineTastingRobeList_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={DD429066-B57D-4E57-AEDC-F3C279888213}&EventTarget="+EventTarget+" ","winetastingrobe","height=550, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function UserSelect_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={888CE114-3180-4E1C-BCAC-3A79B402B408}&EventTarget=" + EventTarget,"userselect","height=550, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function MailAccountEditor_open(ObjectGuid, ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={D29D91AC-179F-474B-9A8C-0B8E328112B3}&ObjectGuid=" + ObjectGuid + "&ObjectAction=" + ObjectAction + "&EventTarget=" + EventTarget,"mailaccount","height=250, width=600, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function TemplatePriceLucieEdit_open(ObjectAction, EventTarget, ObjectGuid, SupplierGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={18D57139-B583-4973-9369-096B16DE4C46}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+"&SupplierGuid="+SupplierGuid+" ","templatepricelucieedit","height=230, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function FormatValidation_open(EventTarget, ControlSelectedItems) { if(CheckSelectedItems(ControlSelectedItems)) { document.forms[0].elements['SelectedProducts'].value = ControlSelectedItems.join(';'); var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={8FB76205-50FA-4DA9-9ED1-B169081AFB1F}&EventTarget="+EventTarget,"ProductFormatValidator","height=700, width=850, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } function ProductView_open(ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={68265F44-79C9-4981-B95B-9C51DA988F37}&ObjectGuid="+ObjectGuid+" ","productview","height=700, width=650, left=10, top=10, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ECSDataExchange_ExportEdit_open(eventTarget, controlSelectedItems, productGuid, languageGuid) { var _qs = ""; var _expOk = false; if(productGuid != null) { _qs += "&ProductGuid="+productGuid; _qs += "&LanguageGuid="+languageGuid; _expOk = true; } else { if(CheckSelectedItems(controlSelectedItems)) { document.forms[0].elements['SelectedProducts'].value = controlSelectedItems.join(';'); _expOk = true; } } if(_expOk) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=03fde9d0-b884-46a1-9a13-38614ce82ef9"+_qs+" ","DataExchangeExportEdit","height=600, width=850, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } function DataExchangeEdit_open(ObjectAction, ControlSelectedItems, ObjectGuid, DataExchangeTransport, DataExchangeLanguageGuid, ProductFormat) { var _qs = ""; var _expOk = false; if(ObjectGuid != null) { _qs += "&ObjectGuid="+ObjectGuid; _qs += "&DataExchangeTransport="+DataExchangeTransport; _qs += "&DataExchangeLanguageGuid="+DataExchangeLanguageGuid; _qs += "&ProductFormat="+ProductFormat; _expOk = true; } else { if(CheckSelectedItems(ControlSelectedItems)) { document.forms[0].elements['SelectedProducts'].value = ControlSelectedItems.join(';'); _expOk = true; } } if(_expOk) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C371B40D-B00A-4CDD-B5D7-788A6C7C79A8}&ObjectAction="+ObjectAction+_qs+" ","DataExchangeEdit","height=600, width=600, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } } function ProductFolderListEdit_open(ObjectAction, EventTarget, FolderGuid, OwnerFirmGuid, IsShared) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={03AB6018-F23B-4F2A-9A72-BC129C6A2C3B}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&FolderGuid="+FolderGuid+"&OwnerFirmGuid="+OwnerFirmGuid+"&IsShared="+IsShared+" ","folderlistedit","height=250, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ProductFolderEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrObjectGuid, OwnerFirmGuid, ParentFolderGuid, IsShared) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={5644C50D-C121-491E-A892-B6F33B2CB58E}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrObjectGuid="+OPtrObjectGuid+"&OwnerFirmGuid="+OwnerFirmGuid+"&ParentFolderGuid="+ParentFolderGuid+"&IsShared="+IsShared+" ","folderdit","height=250, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function BottlingMaterialList_open(ObjectAction, EventTarget, BottlingMaterialGuidField, BottlingMaterialNameField, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={3857F7DE-926B-40CF-950A-26F5AD782C91}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&BottlingMaterialGuidField="+BottlingMaterialGuidField+"&BottlingMaterialNameField="+BottlingMaterialNameField+"&IsMultiSelect="+IsMultiSelect,"BottlingMateriallist","height=300, width=400, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ColorList_open(ObjectAction, EventTarget, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={37CB1859-03F9-410D-BB15-6DCE70D901DD}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect,"colorcollectionobject","height=200, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function WineTypeList_open(ObjectAction, EventTarget, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={1F8BC857-FC7E-4ED8-B556-C8FCBE938CDB}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect,"winetypecollectionobject","height=250, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function ItemSelector_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={45159449-91D9-4728-AC9B-A76C6EB4C780}&EventTarget="+EventTarget+" ","winetypecollectionobject","height=550, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open LogisticGroup edit window; function LogisticGroupEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={FE968C3E-0A52-4EAF-AFE3-1599F50352FC}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","LogisticGroupEdit","height=550, width=850, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open HandlingInstruction list window; function HandlingInstructionList_open(ObjectAction, EventTarget, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={2CE64514-EC18-42D1-93AB-C1253256EFFE}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+" ","HandlingInstructionlist","height=500, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open FirmType list window; function FirmTypeList_open(ObjectAction, EventTarget, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={2EF7DE10-239D-45CC-92C9-B72156201F0C}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+" ","firmtypelist","height=500, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Target edit window; function TargetEdit_open(ObjectAction, EventTarget, FirmGuid, ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={E874C612-BBBB-4696-9507-64C2FC2763D0}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&FirmGuid="+FirmGuid+"&ObjectGuid="+ObjectGuid+" ","targetedit","height=350, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Tax list window; function TaxList_open(ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={17569317-0A49-4706-87D4-C33A586FE5F2}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+" ","taxlist","height=500, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Target list window; function TargetList_open(ObjectAction, EventTarget, SupplierGuid, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={DAFF80E8-1FEC-4918-9AC1-871B079EB1AE}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&SupplierGuid="+SupplierGuid+" ","targetlist","height=350, width=450, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open MailMessage View window; function MailMessageView_open(ObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={6148F78E-618A-490E-9077-7A8594D7EDCF}&ObjectGuid=" + ObjectGuid + " ", "MailMessageView", "height=630, width=630, left=10, top=10, scrollbars=yes, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open MailMessage Edit window; function MailMessageEdit_open(OPtrSessionName, OPtrObjectGuid, ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={9C495CBB-2829-40A7-89FC-C0F3F9B0253F}&ObjectAction=" + ObjectAction + "&OPtrSessionName=" + OPtrSessionName + "&EventTarget=" + EventTarget, "EMailMessageView", "height=450, width=600, left=10, top=10, scrollbars=yes, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open EMailMessage View window; function EMailMessageView_open(OPtrSessionName, OPtrObjectGuid, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={09CAF696-4370-4FC5-81CD-715603380CC3}&OPtrSessionName=" + OPtrSessionName + "&OPtrObjectGuid=" + OPtrObjectGuid + "&EventTarget=" + EventTarget, "EMailMessageView", "height=630, width=600, left=10, top=10, scrollbars=yes, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open EMailMessage Edit window; function EMailMessageEdit_open(OPtrSessionName, OPtrObjectGuid, ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={719525A3-2388-4127-91AA-03DD9364381D}&ObjectAction=" + ObjectAction + "&OPtrSessionName=" + OPtrSessionName + "&EventTarget=" + EventTarget, "EMailMessageView", "height=450, width=600, left=10, top=10, scrollbars=yes, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open TargetedPart edit window; function TargetedPartEdit_open(ObjectAction, EventTarget, ObjectGuid, SupplierGuid, ProductFormat) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={EEBE806C-2651-4DCD-8B50-68BCF154A777}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&ObjectGuid="+ObjectGuid+"&SupplierGuid="+SupplierGuid+"&ProductFormat="+ProductFormat+" ","targetedpart","height=600, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open AuchanACMVs list window; function AuchanAcmvList_open(ObjectAction, EventTarget, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={D323CDE3-AC5C-4DFB-AAA8-DE1AE2B9FD25}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+" ","acmv","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ACMVs list window; function AcmvList_open(ObjectAction, EventTarget, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={F9EC9AF3-C7DF-40C9-B36D-39C4EA230C67}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+" ","acmv","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Awards list window; function AwardList_open(ObjectAction, EventTarget, OPtrSessionName, CheckBoxOnly) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={0F7F274C-A269-4DFE-B981-D984FEA6C9BB}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&CheckBoxOnly="+CheckBoxOnly+" ","award","height=550, width=660, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open WineTasting list window; function WineTastingList_open(ObjectAction, EventTarget, OPtrSessionName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={49212447-4BCE-45CA-877D-F29770430064}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+" ","winetasting","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Vinification list window; function VinificationList_open(ObjectAction, EventTarget, OPtrSessionName, CheckBoxOnly) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={ED9AD94A-CB3A-4D84-A47B-5793A3C7E20D}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&CheckBoxOnly="+CheckBoxOnly+" ","vinification","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Producer list window; function ProducerList_open(ObjectAction, EventTarget, ProducerGuidField, ProducerNameField, SupplierGuid, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={9D6D770F-583A-4BB4-8C92-15C148AFC4A0}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&ProducerGuidField="+ProducerGuidField+"&ProducerNameField="+ProducerNameField+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+"&SupplierGuid="+SupplierGuid+" ","producer","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open ClassificationIFLS list window; function ClassificationIFLSList_open(ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={072E0FA6-69F4-45B6-8729-7604AC597380}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+" ","classificationIFLS","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Appellation list window; function AppellationList_open(ObjectAction, EventTarget, CountryGuidField, CountryNameField, RegionGuidField, RegionNameField, AppellationGuidField, AppellationNameField, CountryGuid, RegionGuid, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={73AD780A-1628-4ABB-BD53-37A1BE14FE43}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&CountryGuidField="+CountryGuidField+"&CountryNameField="+CountryNameField+"&RegionGuidField="+RegionGuidField+"&RegionNameField="+RegionNameField+"&AppellationGuidField="+AppellationGuidField+"&AppellationNameField="+AppellationNameField+"&CountryGuid="+CountryGuid+"&RegionGuid="+RegionGuid+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+" ","subregion","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Appellation list window; function AppellationList_open_multiselect(ObjectAction, EventTarget, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={73AD780A-1628-4ABB-BD53-37A1BE14FE43}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+" ","subregion","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open SubRegion list window; function SubRegionList_open(ObjectAction, EventTarget, CountryGuidField, CountryNameField, RegionGuidField, RegionNameField, SubRegionGuidField, SubRegionNameField, CountryGuid, RegionGuid, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={BA2BEB2E-DCC2-44CD-97F6-9EA5F17C75F4}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&CountryGuidField="+CountryGuidField+"&CountryNameField="+CountryNameField+"&RegionGuidField="+RegionGuidField+"&RegionNameField="+RegionNameField+"&SubRegionGuidField="+SubRegionGuidField+"&SubRegionNameField="+SubRegionNameField+"&CountryGuid="+CountryGuid+"&RegionGuid="+RegionGuid+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+" ","subregion","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open SubRegion list window; function SubRegionList_open_multiselect(ObjectAction, EventTarget, OPtrSessionName, IsMultiSelect) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={BA2BEB2E-DCC2-44CD-97F6-9EA5F17C75F4}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+" ","subregion","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Region list window; function RegionList_open(ObjectAction, EventTarget, CountryGuidField, CountryNameField, RegionGuidField, RegionNameField, CountryGuid, RegionType, OPtrSessionName, IsMultiSelect, IsMultiCountry, FieldsToClearString) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C8EFDB5A-7135-4E23-9037-D45CFCCFFBBC}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&CountryGuidField="+CountryGuidField+"&CountryNameField="+CountryNameField+"&RegionGuidField="+RegionGuidField+"&RegionNameField="+RegionNameField+"&CountryGuid="+CountryGuid+"&RegionType="+RegionType+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+"&IsMultiCountry="+IsMultiCountry+"&FieldsToClearString="+FieldsToClearString+" ","region","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Region list window; function RegionList_open_multiselect(ObjectAction, EventTarget, RegionType, OPtrSessionName, IsMultiSelect, IsMultiCountry) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C8EFDB5A-7135-4E23-9037-D45CFCCFFBBC}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&RegionType="+RegionType+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+"&IsMultiCountry="+IsMultiCountry+" ","region","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Country list window; function CountryList_open(ObjectAction, EventTarget, CountryGuidField, CountryNameField, CountryLuganoGroupField, OPtrSessionName, IsMultiSelect, FieldsToClearString) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={E33AA910-9358-4031-9EB6-2002A090A629}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&CountryGuidField="+CountryGuidField+"&CountryNameField="+CountryNameField+"&CountryLuganoGroupField="+CountryLuganoGroupField+"&OPtrSessionName="+OPtrSessionName+"&IsMultiSelect="+IsMultiSelect+"&FieldsToClearString="+FieldsToClearString+" ","country","height=500, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Multimedia_edit window; function MultimediaEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrSessionName2, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={E7E47F6A-83E6-47AB-8E5E-52B96CB5760E}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrSessionName2="+OPtrSessionName2+"&OPtrObjectGuid="+OPtrObjectGuid+" ","multimediaobject","height=110, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open MultimediaItemView window; function MultimediaItemView_open(objectIndex, width, height) { var _window = window.open("SP_File.aspx?objectIndex=" + objectIndex, "MultimediaItem", "height=" + height + ", width=" + width + ", left=10, top=10, scrollbars=yes, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Grape list window; function GrapeList_open(ObjectAction, EventTarget, OPtrSessionName, CheckBoxOnly) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={0D0039BE-EF3E-4418-9549-9056EA8A4D38}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&CheckBoxOnly="+CheckBoxOnly+" ","grape","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Parcelle edit window; function ParcelleEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={D8C97C3A-AEA3-446C-90AF-56DAF9E14230}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","parcelle","height=350, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=no"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open AddressBookItemEdit window; function AddressBookItemEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrObjectGuid ) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={3A64A964-4BBA-4787-AE75-2C28169A6B7F}&ObjectAction=" + ObjectAction + "&EventTarget=" + EventTarget + "&OPtrSessionName=" + OPtrSessionName+ "&OPtrObjectGuid=" + OPtrObjectGuid, "AddressBookItemEdit_open","height=150, width=570, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open AddressBook window; function AddressBook_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={05C20A86-11E1-47C2-8234-ECE6037DB490}&EventTarget=" + EventTarget, "AddressBook", "height=450, width=600, left=10, top=10, scrollbars=yes, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Firm list window; function FirmList_open(EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={8768D2DE-EACB-491A-BF20-25EB122B662C}&EventTarget="+EventTarget,"firm_list","height=400, width=550, left=50, top=50, location=no, menubar=no, status=yes, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open UserFunction edit window; function UserFunctionEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={57734502-68B4-485D-9522-EDDE61F8E7D4}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","userfunction","height=210, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=no"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open UserPack edit window; function UserPackEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={13E0781F-8564-408A-928E-B3FE88D6EBA5}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","userpack","height=210, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=no"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open User edit window; function UserEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid, OPtr2SessionName, OPtr2PropertyName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={D502E88A-0299-4406-A2ED-C7CDC608DAB7}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+"&OPtr2SessionName="+OPtr2SessionName+"&OPtr2PropertyName="+OPtr2PropertyName+" ","user","height=220, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open SalePoint edit window; function SalePointEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid=2e822f85-a153-443e-af21-d8b4dfc74106&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","salepoint","height=400, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=no"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Contact list window; function ContactList_open(ObjectAction, EventTarget, ContactGuidField, ContactNameField, ContactSurnameField, OPtrSessionName, OPtrPropertyName) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={62E632DC-2160-4028-9D40-97427F393889}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&ContactGuidField="+ContactGuidField+"&ContactNameField="+ContactNameField+"&ContactSurnameField="+ContactSurnameField+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+" ","contact_list","height=400, width=350, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Contact edit window; function ContactEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid, IsDefault) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={4F500981-493A-45BD-A547-84E92C171006}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+"&IsDefault="+IsDefault+" ","contact","height=260, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Website edit window; function WebsiteEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={EEAD754C-B997-4D4B-9C83-609A707E5E0A}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","website","height=210, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Email edit window; function EmailEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid, IsDefault) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={EAD5EB36-0735-4F23-A6B6-297D59036B9A}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+"&IsDefault="+IsDefault+" ","email","height=210, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Telephone edit window; function TelephoneEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid, IsDefault) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={BC5849A3-BBA1-4CB5-9C89-78793C9BF56C}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+"&IsDefault="+IsDefault+" ","telephone","height=210, width=550, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=no"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open Address edit window; function AddressEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid, IsDefault) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={C47F6F33-1186-4CC6-864F-F92EDAAC61EA}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+"&IsDefault="+IsDefault+" ","address","height=240, width=500, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=no"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open FirmCertificate edit window; function FirmCertificateEdit_open(ObjectAction, EventTarget, OPtrSessionName, OPtrPropertyName, OPtrObjectGuid) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={06A3D262-480A-4F22-88D1-F3F62F4009ED}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+"&OPtrSessionName="+OPtrSessionName+"&OPtrPropertyName="+OPtrPropertyName+"&OPtrObjectGuid="+OPtrObjectGuid+" ","firmcertificate","height=150, width=570, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } function MultiStringEditor_open(ObjectAction, EventTarget) { var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={82067F4E-4AF0-4ccc-BC20-6CDD8C974DF7}&ObjectAction="+ObjectAction+"&EventTarget="+EventTarget+" ","multistringobject","height=500, width=400, left=50, top=50, location=no, menubar=no, status=no, toolbar=no, resizable=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //Open UserWord window; function UserWordWindow_open(OPtrSessionName,action,eventTarget, fieldsArray) { var objectValues = ""; for(i=0; i < fieldsArray.length; i++) { objectValues = objectValues+"ObjectValue="+document.forms[0].elements[fieldsArray[i]].value+"&"; } var _window = window.open("page_privat.aspx?IsWindow=true&ControlGuid={07FDDC48-9F8D-4280-9D91-BD585606F723}&OPtrSessionName="+OPtrSessionName+"&ObjectAction="+action+"&EventTarget="+eventTarget+"&"+objectValues+" ","userword","height=300, width=450, left=10, top=10, location=no, menubar=no, status=no, toolbar=no, resizable=yes, scrollbars=yes"); Windows_OpenedWindows[Windows_OpenedWindows.length] = _window; } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //-----------------COMPARERS AND PARSERS------------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- function CompareTwoDates(date1, date2) { var _date1Day = date1.getDate(); var _date1Month = date1.getMonth(); var _date1Year = date1.getYear(); var _date2Day = date2.getDate(); var _date2Month = date2.getMonth(); var _date2Year = date2.getYear(); if(_date1Year > _date2Year) return 1; if(_date1Year < _date2Year) return -1; if(_date1Year == _date2Year) { if(_date1Month > _date2Month) return 1; if(_date1Month < _date2Month) return -1; if(_date1Month == _date2Month) { if(_date1Day > _date2Day) return 1; if(_date1Day < _date2Day) return -1; if(_date1Day == _date2Day) return 0; } } } function ECSParseFloat(str) { _v = "aaa"+1/3; _s = ""; str += ""; if(_v.indexOf(".") > -1 ) _s = "."; if(_v.indexOf(",") > -1 ) _s = ","; if(str == "") return 0; return parseFloat(str.replace(".", _s).replace(",", _s)); } //convert to string a numeric value with specified precision function ECSToString(value, precision) { var _sv = ""; var _p; _sv = Math.round( ECSParseFloat(value)* Math.pow(10,precision) )/Math.pow(10,precision)+"" ; _sv = _sv.replace(",","."); if(_sv.indexOf(".") > -1) _p = _sv.length - _sv.indexOf(".")-1; else { _p = 0; _sv += "."; } for(_i=0; _i<(precision-_p); _i++) _sv += "0"; return _sv; } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //----------------------EDIT CARD CHECK-------------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- //Initializes arrays for fields to check FieldsToCheck = []; //FieldsToCheck[0][0] - ID //FieldsToCheck[0][1] - Title //FieldsToCheck[0][2] - Checkers arrays //FieldsToCheck[0][3] - IsChecked flag //Array of exist GTINs JS_ProductGtins = []; //Update a fieldToCheck in the array function FieldsToCheck_Update(fieldToCheck) { var _fExists = false; for(iu=0; iu < FieldsToCheck.length; iu++) { if(FieldsToCheck[iu][0] == fieldToCheck[0]) { FieldsToCheck[iu] = fieldToCheck; _fExists = true; } } if(!_fExists) FieldsToCheck[FieldsToCheck.length] = fieldToCheck; return; } function FieldsToCheck_Remove(fieldId) { _fTemp = []; for(ir=0; ir < FieldsToCheck.length; ir++) { if(FieldsToCheck[ir][0] != fieldId) _fTemp[_fTemp.length] = FieldsToCheck[ir]; } FieldsToCheck = _fTemp; return; } //Principal edit card check function EditCard_check(source, arguments) { form = document.forms[0]; for(i=0; i< FieldsToCheck.length;i++) { if(form.elements[FieldsToCheck[i][0]] != null) { for(j=0; j< FieldsToCheck[i][2].length; j++) { switch(FieldsToCheck[i][2][j]) { case 'IsMandatory': if(EditCardElement_check_empty(form.elements[FieldsToCheck[i][0]])) { alert('Ce champ est obligatoire : '+FieldsToCheck[i][1]+' '); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsGln': if(!EditCardElement_check_gln(form.elements[FieldsToCheck[i][0]])) { alert('Le code GLN est incorrect : '+FieldsToCheck[i][1]+' '); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsGtin': if(!EditCardElement_check_gtin(form.elements[FieldsToCheck[i][0]])) { alert('Le code GTIN est incorrect : '+FieldsToCheck[i][1]+' '); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsSscc': if(!EditCardElement_check_sscc(form.elements[FieldsToCheck[i][0]])) { alert('Le code SSCC est incorrect : '+FieldsToCheck[i][1]+' '); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsUniqueGtin': if(!FieldsToCheck[i][3] && !EditCardElement_check_uniqueGtin(form.elements[FieldsToCheck[i][0]])) { if( !confirm('Ce code GTIN existe déjà, êtes-vous sûr de vouloir continuer? : '+FieldsToCheck[i][1]+' ') ) { form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } else FieldsToCheck[i][3] = true; } break; case 'IsNumeric': if(!EditCardElement_check_numeric(form.elements[FieldsToCheck[i][0]])) { alert('Le champ "'+FieldsToCheck[i][1]+'" doit être numérique'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsInteger': if(!EditCardElement_check_integer(form.elements[FieldsToCheck[i][0]])) { alert('Le champ "'+FieldsToCheck[i][1]+'" doit être un entier'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsPositive': if(!EditCardElement_check_positive(form.elements[FieldsToCheck[i][0]])) { alert('Le champ "'+FieldsToCheck[i][1]+'" doit être supérieure à zéro'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsAlphaNumeric': if(!EditCardElement_check_alphanumeric(form.elements[FieldsToCheck[i][0]])) { alert('Le champ "'+FieldsToCheck[i][1]+'" doit être alphanumérique. Les caractères : \&, \\, \/, \', \", \* sont interdits.'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsImage': if(!EditCardElement_check_image(form.elements[FieldsToCheck[i][0]])) { alert('Le champ "'+FieldsToCheck[i][1]+'" n\'accèpte que les images: *.jpeg, *.jpg, *.gif'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsFile': if(!EditCardElement_check_file(form.elements[FieldsToCheck[i][0]])) { alert('Le champ "'+FieldsToCheck[i][1]+'" n\'accepte que les fichiers: *.doc, *.xls, *.pdf, *.txt, *.jpeg, *.jpg, *.gif'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsImportFile': if(!EditCardElement_check_IsImportFile(form.elements[FieldsToCheck[i][0]])) { alert('"'+FieldsToCheck[i][1]+'" Les types de fichier autorisés sont : *.xls'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; case 'IsEmail': if(!EditCardElement_check_isemail(form.elements[FieldsToCheck[i][0]])) { alert('Le format d’adresse email est incorrect : "'+FieldsToCheck[i][1]+'"'); form.elements[FieldsToCheck[i][0]].focus(); arguments.IsValid = false; return false; } break; } } } } arguments.IsValid = true; return true; } // Return true if empty, elsewhere false function EditCardElement_check_empty(element) { if(element.type == "checkbox") { if(element.checked)return false; else return true; } else { if(element.value == "")return true; else return false; } } //Return true if GTIN is correct, elsewhere false function EditCardElement_check_gtin(element) { if(element.value.length == 0) return true; if(element.value.length > 14) return false; return EditCardElement_check_eankey(element); } //Return true if GLN is correct, elsewhere false function EditCardElement_check_gln(element) { if(element.value.length == 0) return true; if(element.value.length != 13) return false; return EditCardElement_check_eankey(element); } //Return true if SSCC is correct, elsewhere false function EditCardElement_check_sscc(element) { if(element.value.length == 0) return true; if(element.value.length != 18) return false; return EditCardElement_check_eankey(element); } function EditCardElement_check_eankey(element) { if(isNaN(element.value)) return false; s_wo_k = element.value.substring(0,element.value.length-1); _pairSumm=0; _unpairSumm=0; for(k=s_wo_k.length-1; k>-1; k-=2) { _pairSumm += parseInt(s_wo_k.charAt(k)); } _pairSumm = _pairSumm*3; for(k=s_wo_k.length-2; k>-1; k-=2) { _unpairSumm += parseInt(s_wo_k.charAt(k)); } k = 10-(_pairSumm+_unpairSumm)%10; if(k == element.value.substring(element.value.length-1,element.value.length) || ( k == 10 && element.value.substring(element.value.length-1,element.value.length) == 0) ) return true; else return false; } //Return true if GTIN is unique, elsewhere false function EditCardElement_check_uniqueGtin(element) { for(_i=0; _i < JS_ProductGtins.length; _i++) { if(JS_ProductGtins[_i] == element.value) return false; } return true; } //Returns true if element is numeric, elsewhere false. function EditCardElement_check_numeric(element) { if(element.value == "")return true; else { if( (!isNaN(element.value)) || (!isNaN(element.value.replace(".",","))) || (!isNaN(element.value.replace(",","."))) )return true; else return false; } } //Returns true if element is integer, elsewhere false. function EditCardElement_check_integer(element) { if(element.value == "")return true; else { if(EditCardElement_check_numeric(element)) { if(element.value == Math.round(element.value)) return true; else return false; } else return false; } } //Returns true if element is positive, elsewhere false. function EditCardElement_check_positive(element) { if(element.value == "")return true; else { if( element.value >= 0 || element.value.replace(".",",")>=0 || element.value.replace(",",".")>=0 ) return true; else return false; } } //Returns true if element is positive, elsewhere false. function EditCardElement_check_alphanumeric(element) { if(element.value == "")return true; else { if( element.value.indexOf("\'") > -1 || element.value.indexOf("\"") > -1 || element.value.indexOf("\&") > -1 || element.value.indexOf("\/") > -1 || element.value.indexOf("\\") > -1 || element.value.indexOf("\*") > -1) return false; else return true; } } //Returns true if element is image, elsewhere false. function EditCardElement_check_image(element) { if(element.value == "")return true; else { file_exts = element.value.toLowerCase( ).split("."); file_ext = file_exts[file_exts.length-1]; if(file_ext == "jpeg" || file_ext == "jpg" || file_ext == "gif") return true; else return false; } } //Returns true if element is an autorized file, elsewhere false. function EditCardElement_check_file(element) { if(element.value == "")return true; else { file_exts = element.value.toLowerCase( ).split("."); file_ext = file_exts[file_exts.length-1]; if(file_ext == "doc" || file_ext == "xls" || file_ext == "txt" || file_ext == "pdf" || file_ext == "jpeg" || file_ext == "jpg" || file_ext == "gif") return true; else return false; } } //Returns true if element is an autorized file for import, elsewhere false. function EditCardElement_check_IsImportFile(element) { if(element.value == "")return true; else { file_exts = element.value.toLowerCase( ).split("."); file_ext = file_exts[file_exts.length-1]; if(file_ext == "xls") return true; else return false; } } //Returns true if element is an correct email addresse, elsewhere false. function EditCardElement_check_isemail(element) { if(element.value == "")return true; else return (element.value.indexOf("@") != -1); } //Compares parent product weight with total weight of child products function EditCardElement_check_ParentChildWeight(parentWeightValue, parentWeightUnit, childWeightArray) { var totalChildWeight = 0; var i = 0; for (i = 0; i < childWeightArray.length; i++) totalChildWeight += ECSUnitOfMeasure_Convert(childWeightArray[i][0], childWeightArray[i][1], parentWeightUnit)* childWeightArray[i][2]; return parentWeightValue >= totalChildWeight; } //--------------------------------------------------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- //--------------------------------------------------------------------- //---------------------------------------------------------------------