function DeleteConfirm(Type,TypeID){ if (confirm("Are you sure you want to delete?")) { if (Type == "TeamMember") { location = '/cms/submit.asp?TeamMemberID='+TypeID+'&SubmitType=DeleteTeamMember' } else if (Type == "Client") { location = '/cms/submit.asp?ClientID='+TypeID+'&SubmitType=DeleteClient' } else if (Type == "Product") { location = '/cms/submit.asp?ProductID='+TypeID+'&SubmitType=DeleteProduct' } else if (Type == "Project") { location = '/cms/submit.asp?ProjectID='+TypeID+'&SubmitType=DeleteProject' } else if (Type == "AssetArea") { location = '/cms/submit.asp?AssetAreaID='+TypeID+'&SubmitType=DeleteAssetArea' } else if (Type == "Help") { location = '/cms/submit.asp?HelpID='+TypeID+'&SubmitType=DeleteHelp' } else if (Type == "CMSUser") { location = '/cms/submit.asp?AdminUserID='+TypeID+'&SubmitType=DeleteCMSUser' } else if (Type == "Asset") { location = '/cms/submit.asp?AssetID='+TypeID+'&SubmitType=DeleteAsset' } else if (Type == "Users") { location = '/cms/submit.asp?UserID='+TypeID+'&SubmitType=DeleteUser' } } else { return false } } function DeleteConfirm2(Type,TypeID){ if (confirm("Are you sure you want to delete? ALL products, projects and asset areas will also be removed!")) { if (Type == "Client") { location = '/cms/submit.asp?ClientID='+TypeID+'&SubmitType=DeleteClient' } } else { return false } } function selectChange(control, controlToPopulate, ItemArray, GroupArray) { var myEle ; var x ; // Empty the second drop down box of any choices for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null; if (control.name == "firstChoice") { // Empty the third drop down box of any choices for (var q=form.thirdChoice.options.length;q>=0;q--) form.thirdChoice.options[q] = null; } // ADD Default Choice - in case there are no values myEle = document.createElement("option") ; myEle.value = 0 ; myEle.text = "[SELECT]" ; // controlToPopulate.add(myEle) ; controlToPopulate.appendChild(myEle) // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ( GroupArray[x] == control.value ) { myEle = document.createElement("option") ; //myEle.value = x ; myEle.setAttribute('value',x); // myEle.text = ItemArray[x] ; var txt = document.createTextNode(ItemArray[x]); myEle.appendChild(txt) // controlToPopulate.add(myEle) ; controlToPopulate.appendChild(myEle) } } } function selectChange(control, controlToPopulate, ItemArray, GroupArray) { var myEle ; var x ; // Empty the second drop down box of any choices for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null; if (control.name == "firstChoice") { // Empty the third drop down box of any choices for (var q=form.thirdChoice.options.length;q>=0;q--) form.thirdChoice.options[q] = null; } // ADD Default Choice - in case there are no values myEle=document.createElement("option"); theText=document.createTextNode("Please select..."); myEle.appendChild(theText); myEle.setAttribute("value","0"); controlToPopulate.appendChild(myEle); // Now loop through the array of individual items // Any containing the same child id are added to // the second dropdown box for ( x = 0 ; x < ItemArray.length ; x++ ) { if ( GroupArray[x] == control.value ) { myEle = document.createElement("option") ; //myEle.value = x ; myEle.setAttribute("value",x); // myEle.text = ItemArray[x] ; var txt = document.createTextNode(ItemArray[x]); myEle.appendChild(txt) // controlToPopulate.add(myEle) ; controlToPopulate.appendChild(myEle) } } } function fillSelectFromArray(selectCtrl, itemArray, goodPrompt, badPrompt, defaultItem) { var i, j; var prompt; // empty existing items9 for (i = selectCtrl.options.length; i >= 0; i--) { selectCtrl.options[i] = null; } prompt = (itemArray != null) ? goodPrompt : badPrompt; if (prompt == null) { j = 0; } else { selectCtrl.options[0] = new Option(prompt); j = 1; } if (itemArray != null) { // add new items for (i = 0; i < itemArray.length; i++) { selectCtrl.options[j] = new Option(itemArray[i][0]); if (itemArray[i][1] != null) { selectCtrl.options[j].value = itemArray[i][1]; } j++; } // select first item (prompt) for sub list if (selectCtrl.options.length > 2){ selectCtrl.options[0].selected = true; }else{ selectCtrl.options[0].value = selectCtrl.options[1].value selectCtrl.options[0].selected = true; } } } secondmenu = new Array( new Array( new Array("All projects", ""), new Array("", "") ), new Array( new Array("All projects", ""), new Array("ASTEROID", ""), new Array("NICE", ""), new Array("Project B", "") ), new Array( new Array("All projects", ""), new Array("", "") ), new Array( new Array("All projects", ""), new Array("", "") ) ); thirdmenu = new Array( new Array( new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("Media materials", ""), new Array("Visuals", ""), new Array("Customer statements", ""), new Array("Medical statements", ""), new Array("Contact grids", ""), new Array("Journalist charts", ""), new Array("Quarterly coverage charts", ""), new Array("Coverage", ""), new Array("Features", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ) ), new Array( new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ), new Array( new Array("All asset groups", ""), new Array("", "") ) ) ); function checkuserpass() { if (document.login.username.value == "") { alert("Please enter a Username") return false } if (document.login.password.value == "") { alert("Please enter a Password") return false } return true } function checkpassmatch() { if (document.pass.password.value == "") { alert("Please enter a Password") return false } if (document.pass.password1.value == "") { alert("Please confirm your Password") return false } if (document.pass.password.value != document.pass.password1.value) { alert("Your passwords do not match please try again") return false } if (document.pass.password.value.length < 6 ) { alert("Sorry your password is less than 6 characters long please try again") return false } return true } function checkhelp() { var found_it for (var i=0; i