34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
function pestanaActiva(pestana) {
|
|
var links = document.getElementsByClassName("navBarLink")
|
|
for (var i = 0; i < links.length; i++) {
|
|
if (links[i].classList.contains("linkNavActivo") == true)
|
|
links[i].classList.remove("linkNavActivo")
|
|
}
|
|
|
|
if (document.getElementById(pestana).classList.contains("linkNavActivo") == false) {
|
|
document.getElementById(pestana).classList.add("linkNavActivo")
|
|
}
|
|
}
|
|
|
|
function eliminarCookies(id, cut) {
|
|
var theCookies = document.cookie.split(';');
|
|
for (var i = 0; i < theCookies.length; i++) {
|
|
if (theCookies[i].trim().indexOf(id) >= 0 && theCookies[i].trim().indexOf(cut) == -1) {
|
|
ASPxClientUtils.DeleteCookie(theCookies[i].trim().split("=")[0])
|
|
}
|
|
}
|
|
}
|
|
function getUrlParameter(sParam) {
|
|
var sPageURL = window.location.search.substring(1),
|
|
sURLVariables = sPageURL.split('&'),
|
|
sParameterName,
|
|
i;
|
|
|
|
for (i = 0; i < sURLVariables.length; i++) {
|
|
sParameterName = sURLVariables[i].split('=');
|
|
|
|
if (sParameterName[0] === sParam) {
|
|
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
|
|
}
|
|
}
|
|
}; |