function getObj(element_id) { return document.getElementById(element_id); } function show(element_id){ element = getObj(element_id); element.style.visibility ="visible" } function hide(element_id){ element = getObj(element_id); element.style.visibility ="hidden" } function roll(element_id) { if (document.images) { document.images[element_id].src=eval("img_"+element_id+"_roll.src"); } } function unroll(element_id) { if (document.images) { document.images[element_id].src=eval("img_"+element_id+".src"); } } function Concat(string1,string2,destination) { //str1 = document.admin_form.elements[string1]; str2 = document.admin_form.elements[string2]; dest = document.admin_form.elements[destination]; alert(string1); alert(str2.value); dest.value = string1+""+str2.value; } function checkSub(field,priveledge,prefix){ if (priveledge == "all" || priveledge == "root") return true; if (field.value.substr(0,prefix.length) != prefix) { field.focus(); alert("You cannot change the subgroup! Title must start with '"+prefix+"'!"); field.value = field.defaultValue; return false; } return true; } function checkOrder(field,priveledge,prefix){ if (priveledge == "all" || priveledge == "root") return true; if (field.value.substr(0,prefix.length) != prefix) { field.focus(); alert("You cannot change the integer part, only the decimal! Number must start with '"+prefix+"'!"); field.value = field.defaultValue; return false; } return true; } function validateNewPage(){ field = document.getElementById('Welcome'); alert(field.validate); /*if (priveledge == "all" || priveledge == "root") return true; if (field.value.substr(0,prefix.length) != prefix) { field.focus(); alert("You cannot change the integer part, only the decimal! Number must start with '"+prefix+"'!"); field.value = field.defaultValue; return false; } return true;*/ return false; } function pagesNameChange(target, source, method) { if (method == "id") target = document.getElementById(target); else target = document.getElementsByName(target)[0]; if (source.value == "custom") target.value=target.defaultValue; else target.value="/main.php?name="+source.value; } function in_array(stringToSearch, arrayToSearch) { for (s = 0; s < arrayToSearch.length; s++) { thisEntry = arrayToSearch[s].toString(); if (thisEntry == stringToSearch) { return true; } } return false; } if (document.images) { // define variables to hold the "up" and "over" images var img_group1 = new Image(); var img_group1_roll = new Image(); // assign images to the SRC properties of new variables // this is when they are all loaded into memory, before the page is loaded img_group1.src = "/layouts/default/button_1.jpg"; img_group1_roll.src = "/layouts/default/button_1_r.jpg"; // define variables to hold the "up" and "over" images var img_group2 = new Image(); var img_group2_roll = new Image(); // assign images to the SRC properties of new variables // this is when they are all loaded into memory, before the page is loaded img_group2.src = "/layouts/default/button_2.jpg"; img_group2_roll.src = "/layouts/default/button_2_r.jpg"; // define variables to hold the "up" and "over" images var img_group3 = new Image(); var img_group3_roll = new Image(); // assign images to the SRC properties of new variables // this is when they are all loaded into memory, before the page is loaded img_group3.src = "/layouts/default/button_3.jpg"; img_group3_roll.src = "/layouts/default/button_3_r.jpg"; // define variables to hold the "up" and "over" images var img_group4 = new Image(); var img_group4_roll = new Image(); // assign images to the SRC properties of new variables // this is when they are all loaded into memory, before the page is loaded img_group4.src = "/layouts/default/button_4.jpg"; img_group4_roll.src = "/layouts/default/button_4_r.jpg"; }