//---------------------Include/remove users--------------------------------------------- function remove_user(out,usrTasks){ select_users = document.getElementById(out); array_usrTasks = usrTasks.split("|"); for(i=0;i' + select_available_users.options[i].text + ''; } } else if ( (select_users.innerHTML.indexOf('value="'+select_available_users.options[i].value+'"')) == '-1' ) { new_options += ''; } } } if (new_options != '') { if(is_firefox_0) fixBugInnerSelect(select_users,'###' + new_options + select_users.innerHTML); else select_users.innerHTML = '###' + new_options + select_users.innerHTML; select_users.outerHTML = select_users.outerHTML; } } //-----------------------Fim include/remove users----------------------------------- //----------------------Serialize Arrays-------------------------------------------- function serialize( mixed_value ) { var _getType = function( inp ) { var type = typeof inp, match; var key; if (type == 'object' && !inp) { return 'null'; } if (type == "object") { if (!inp.constructor) { return 'object'; } var cons = inp.constructor.toString(); match = cons.match(/(\w+)\(/); if (match) { cons = match[1].toLowerCase(); } var types = ["boolean", "number", "string", "array"]; for (key in types) { if (cons == types[key]) { type = types[key]; break; } } } return type; }; var type = _getType(mixed_value); var val, ktype = ''; switch (type) { case "function": val = ""; break; case "undefined": val = "N"; break; case "boolean": val = "b:" + (mixed_value ? "1" : "0"); break; case "number": val = (Math.round(mixed_value) == mixed_value ? "i" : "d") + ":" + mixed_value; break; case "string": val = "s:" + mixed_value.length + ":\"" + mixed_value + "\""; break; case "array": case "object": val = "a"; var count = 0; var vals = ""; var okey; var key; for (key in mixed_value) { ktype = _getType(mixed_value[key]); if (ktype == "function") { continue; } okey = (key.match(/^[0-9]+$/) ? parseInt(key, 10) : key); vals += serialize(okey) + serialize(mixed_value[key]); count++; } val += ":" + count + ":{" + vals + "}"; break; } if (type != "object" && type != "array") { val += ";"; } return val; } //---------------------Fim serialize arrays----------------------------------------- //----------------------Count Values------------------------------------------------ function countValues(val){ var num=val.length; users = new Array(num); for(i=0;i 30) && ( mes == 04 || mes == 06 || mes == 09 || mes == 11 ) || dia > 31) { situacao = "falsa"; } // verifica se o mes e valido if (mes < 01 || mes > 12 ) { situacao = "falsa"; } // verifica se e ano bissexto if (mes == 2 && ( dia < 01 || dia > 29 || ( dia > 28 && (parseInt(ano / 4) != ano / 4)))) { situacao = "falsa"; } if (d.value == "") { situacao = "falsa"; } if (situacao == "falsa") { alert("Data incorreta"); d.value = ""; d.focus(); } } //--------------------Fim Verifica data---------------------------------------------