
function toggle( targetId ){
  if (document.getElementById) {
  	target = document.getElementById( targetId );
  	if (target.style.display == "none"){
  	  target.style.display = "";
  	}
  	else {
  	  target.style.display = "none";
  	}
  }
}

function show( targetId ){
  if (document.getElementById) {
    target = document.getElementById( targetId );
    if (target) {
      target.style.display = "";
    }
  }
}

function hide( targetId ){
  if (document.getElementById) {
    target = document.getElementById( targetId );
    if (target) {
      target.style.display = "none";
    }
  }
}

function link( url ) {
  window.location = url;
}

function display_textilehelp () {
    window.open(
        '/support.pl?action=textile&popup=1',
        'textilehelp',
        'width=400,height=300,resizable=no,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,copyhistory=no'
    );
}

function popup_scrollbar(url, height) {
    if (!height) {
        height = 400;
    }
    window.open(
        url,
        'royal_quiz_popup',
        'width=700,height=' + height + ',resizable=no,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,copyhistory=no'
    );
}

    function pause(numberMillis) {
        var now = new Date();
        var exitTime = now.getTime() + numberMillis;
        while (true) {
            now = new Date();
            if (now.getTime() > exitTime)
                return;
        }
    }
