function strLen(d) {
var c = 0;
for (var a = 0; a < d.length; a++) {
var b = d.charCodeAt(a);
if ((b >= 0 && b < 129) || (b == 63728) || (b >= 65377 && b < 65440) || (b >= 63729 && b < 63732)) {
c += 1
} else {
c += 2
}
}
return c
}
function GetDomObj(a) {
return document.getElementById(a)
}
function turnPage(o,l, a, h, e) {
var p = 602;
var g = 14;
var f = 0;
var i = GetDomObj(a);
var j = i.getElementsByTagName("li");
var b = false;
if (e) {
p = e
}
switch (h) {
case "previous":
var q = false;
for (var c = 0; c < j.length; c++) {
var k;
var d = false;
if ((j[c].style.display == "block" || j[c].style.display == "") && q == false) {
if (c > 0) {
j[c - 1].style.display = "block"
}
if (c == 1) {
l.className = "to-l-not"
}
q = true;
d = true
}
if (q == true) {
if (d == true && c > 0) {
f = strLen(j[c - 1].innerHTML) * o
}
k = strLen(j[c].innerHTML);
if (f == 0) {
f += k * o
} else {
if (f + (k * o) + g <= p && b == false) {
f += k * o + g;
if (l.nextSibling != null) {
l.nextSibling.className = "to-r-not"
}
} else {
if (l.nextSibling != null) {
l.nextSibling.className = "to-r-can"
}
j[c].style.display = "none";
b = true
}
}
}
}
for (var c = j.length - 1; c >= 0; c--) {
if (j[c].style.display == "none" && j[c].className == "on" && (c - 1) >= 0) {
nTabs(j[c - 1], (c - 1));
j[c - 1].onmouseover()
}
}
break;
case "next":
var s = -1;
var r = -1;
var k;
for (var c = 0; c < j.length; c++) {
if (j[c].style.display == "block" || j[c].style.display == "") {
s = c
}
if (s >= 0 && j[c].style.display == "none") {
r = c;
if (c == j.length - 1) {
l.className = "to-r-not"
}
j[c].style.display = "block";
break
}
}
if (r >= 0) {
for (var c = r; c >= 0; c--) {
k = strLen(j[c].innerHTML);
if (f == 0) {
f += k * o
} else {
if (f + (k * o) + g <= p && b == false) {
f += k * o + g;
if (l.previousSibling != null) {
l.previousSibling.className = "to-l-not"
}
} else {
if (l.previousSibling != null) {
l.previousSibling.className = "to-l-can"
}
j[c].style.display = "none";
b = true
}
}
}
}
for (var c = 0; c < j.length; c++) {
if (j[c].style.display == "none" && j[c].className == "on" && (c + 1) <= j.length - 1) {
nTabs(j[c + 1], (c + 1));
j[c + 1].onmouseover()
}
}
break;
default:
break
}
}
function nTabs(G,F){
if(G.className=="on"){
return;
}
var H=G.parentNode.id;
var E=document.getElementById(H).getElementsByTagName("li");
for(i=0;i