var st;
 function init(id) {
  var obj = document.getElementById(id);
  if (obj) {
    obj.state = 0;
    obj.timer = null;
    obj.maxVert = obj.scrollHeight - obj.offsetHeight;
    obj.maxGor = obj.scrollWidth - obj.offsetWidth;
  }
}

function scroll_down(id,timer) {
  var obj = document.getElementById(id);
  if (!obj.maxVert) init(id);
  if (timer == undefined) obj.state = 1;
  if ((obj.maxVert > obj.scrollTop) && (obj.state == 1)) {
    obj.scrollTop = obj.scrollTop + 10;
    obj.timer = setTimeout('scroll_down(\''+id+'\',true)',100);
  }
}

function scroll_up(id,timer) {
  var obj = document.getElementById(id);
  if (!obj.maxVert) init(id);
  if (timer == undefined) obj.state = -1;
  if ((obj.scrollTop > 0) && (obj.state == -1)) {
    obj.scrollTop = obj.scrollTop > 10 ? obj.scrollTop - 10 : 0;
    obj.timer = setTimeout('scroll_up(\''+id+'\',true)',100);
  }
}

function scroll_left(id, timer){
	var obj = document.getElementById(id);
	if (!obj.maxGor) init(id);
	if (timer == undefined) obj.state = -1;
	if ((obj.scrollLeft > 0) && (obj.state == -1)) {
    obj.scrollLeft = obj.scrollLeft > 10 ? obj.scrollLeft - 10 : 0;
    obj.timer = setTimeout('scroll_left(\''+id+'\',true)',20);
  }
}

function scroll_right(id, timer){
	var obj = document.getElementById(id);
	 if (!obj.maxGor) init(id);
 	 if (timer == undefined) obj.state = 1;
 	 if ((obj.maxGor > obj.scrollLeft) && (obj.state == 1)) {
    obj.scrollLeft = obj.scrollLeft + 10;
    obj.timer = setTimeout('scroll_right(\''+id+'\',true)',20);
  }
}
function scroll_stop(id) {
  var obj = document.getElementById(id);
  if (obj) {
    if (obj.timer) clearTimeout(obj.timer);
    obj.state = 0;
  }

}
function create( name, attributes ) {
var el = document.createElement( name );
if ( typeof attributes == 'object' ) {
for ( var i in attributes ) {
el.setAttribute( i, attributes[i] );

if ( i.toLowerCase() == 'class' ) {
el.className = attributes[i]; // for IE compatibility

} else if ( i.toLowerCase() == 'style' ) {
el.style.cssText = attributes[i]; // for IE compatibility
}
}
}
for ( var i = 2;i < arguments.length; i++ ) {
var val = arguments[i];
if ( typeof val == 'string' ) { val = document.createTextNode( val ) };
el.appendChild( val );
}
return el;
}

function action3() {
	document.getElementById('action_n1').style.display = 'block';
	document.getElementById('action_n2').style.display = 'block';
	document.getElementById('action_n3').style.display = 'block';
}
