function ToggleButton(button, validationGroup) {
if (typeof (Page_Validators) == "undefined") {
DisableButton(button);
}
if (typeof (Page_ClientValidate) == 'function') {
Page_ClientValidate(validationGroup);
if (Page_IsValid) {
DisableButton(button)
}
}
else {
DisableButton(button);
}
}
function DisableButton(button) {
div1 = window.document.getElementById(button.id + 'Div1');
div2 = window.document.getElementById(button.id + 'Div2');
div1.style.display = "none";
div2.style.display = "inline";
}

function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
return [curleft, curtop];
}
}

function tab_show(id, n, total) {
$$('div[id^=' + id + ']').setStyle("display", "none");
$(id + n).setStyle("display", "block");
for (x = 1; x <= total; x = x + 1) {
$('link_' + id + x).className = "boxTab";
}
$('link_' + id + n).className = "boxTabActive";
}
