var timer;
var win;
var URL2;


function nextPage(URL){
URL2 = URL;
CenterPopup('../main/WaitingMessage.html',400,350)
setTimeout('gotoNextPage()' , 0);
}

function gotoNextPage(){
window.location.href = URL2;
}

function hideMessage(){
win = window.open('../main/WaitingMessage.html','aa','toolbar=no,scrollbar=no,width=400,height=350');
win.close();
clearTimeout(timer);

}

function getbrowserwidth()
{
 if (navigator.userAgent.indexOf("MSIE") > 0)
 {
  return(document.body.clientWidth);
 }
 else
 {
  return window.outerWidth;
 }
}

function getbrowserheight()
{
 if (navigator.userAgent.indexOf("MSIE") > 0)
 {
  return(document.body.clientHeight);
 }
 else
 {
  return(window.outerHeight);
 }
}

var popup = new Object()
function CenterPopup(URL, width, height)
{
 // get center of browser window
 var X = getbrowserwidth() / 2
 var Y = getbrowserheight() / 2

 popup = window.open(URL,'aa',
 		     'scrollbars=no ' +
                     'width=' + width + ' ' +
                     'height=' + height + ' ' +
                     'top=' + (window.screenTop + (Y - (height/2))) + ' ' +
                     'left=' + (window.screenLeft + (X - (width/2)))
                     )

popup.focus()
}
