// JavaScript Document
<!--DIV SCROLL-->
var timer;
function scrollY(eyeD, ext){
	timer=setInterval(function(){ 
	document.getElementById(eyeD).scrollTop += ext 
	},1);
}

function scrollX(eyeD, ext){
	timer=setInterval(function(){ 
	document.getElementById(eyeD).scrollLeft += ext 
	},1);
}

function confirmRequest(prompt)
{
var agree=confirm(prompt);
if (agree)
	return true ;
else
	return false ;
}


function newWindow(mypage,myname,w,h,features) {
  var win = null;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

function DisplayPanel(art)
{

	DarkenPage();
    ShowDisplayPanel(art);
}

function ShowDisplayPanel(artID)
{
    var display_panel = document.getElementById('display_panel');
    
    // w is a width of the newsletter panel
    w = Math.round((document.body.clientWidth*0.75));
    // h is a height of the newsletter panel
    h = 250;
    
    // get the x and y coordinates to center the newsletter panel
    //xc = Math.round((document.body.clientWidth/2)-(w/2))
    xc = 17
	yc = Math.round((document.body.clientHeight/2)-(h/2))
    
    // show the newsletter panel
    display_panel.style.left = xc + "px";
    display_panel.style.top  = yc + "px";

	
	display_panel.innerHTML = "<div style='width:100%; height:100%; position:absolute; top:0px;'><iframe width='100%' height='100%' frameborder='0'  allowtransparency='true' scrolling='vertical' src='minidisplay.php?articleid="+artID+"'></iframe></div><div class='closetab' onclick='javascript:CloseMe();'>Close</div>";

    display_panel.style.display = 'block';

}

function CloseMe()
{
    // hide the newsletter panel
    var display_panel = document.getElementById('display_panel');
    display_panel.style.display = 'none';
    // lighten the page again
    LightenPage();
}

// this function puts the dark screen over the entire page
function DarkenPage()
{
    var page_screen = document.getElementById('page_screen');
    page_screen.style.height = document.body.parentNode.scrollHeight + 'px';
    page_screen.style.display = 'block';
}

// this function removes the dark screen and the page is light again
function LightenPage()
{
    var page_screen = document.getElementById('page_screen');
    page_screen.style.display = 'none';
}

function addParam(name,value)
{
   var form = document.forms['params'];
   // form.action = 'put your url here';
   var el = document.createElement("input");
   el.type = "hidden";
   el.name = name;
   el.id = name;
   el.value = value;
   form.appendChild(el);
}