﻿// Toggles visibility in the PublikationOrderFormUC control.
function toggle_visibility(e) {
    var plus = document.getElementById('plus');
    var minus = document.getElementById('minus');    

    if (minus.style.display != 'inline') {    
        minus.style.display = 'inline';
        plus.style.display = 'none';
        e.style.display = 'block';
    } else {            
        minus.style.display = 'none';
        plus.style.display = 'inline';
        e.style.display = 'none';
    }
}

function ShowHide(chkbox, txtCert, validator) {        
	if(chkbox.checked) {				
		txtCert.style.display = 'none';
		txtCert.style.visibility = 'hidden';
		ValidatorEnable(validator, false);  
	}
	else {
		txtCert.style.display = '';
		txtCert.style.visibility = 'visible';
		ValidatorEnable(validator, true);  
	}
} 

function toggle_visibility2(element) {
    var pel = element.parentNode;
    var pel2 = pel.previousSibling;
    var pel3 = pel2.childNodes(0);
    var pel4 = pel3.childNodes(5);    
    pel4.className = (pel4.className=="FontCorbel"?"ShowClick FontCorbel":"FontCorbel");    
}

function closePopup(popupid) {
    var e = $find(popupid);
    e.hide();
}

function SetActiveTab(tabControl, tabNumber) {   
    var method = 'SetActiveTab2 (\''+tabControl+ '\',' + tabNumber + ')';
    timers[tabNumber] = setTimeout(method, 1000);    
}

function ClearActiveTab(tabControl, tabNumber) {
    clearTimeout(timers[tabNumber]);
}

function SetActiveTab2(tabControl, tabNumber) {
    var ctrl = $find(tabControl);
    ctrl.set_activeTabIndex(tabNumber);
}

var timers = new Array();

