var wdh = 720; hgt = 600;
var success;

function loadwin(url)	{
var left, top;
var width = screen.width;

// Resize the screen depending on the users display
if(screen.width == 1280 && screen.height == 1024)	{
// wdh = 1007;
// hgt = 700;

var wdh = 720; hgt = 600;
}

else if(screen.width > 1024 && screen.height > 768)	{
// wdh = 1007;
// hgt = 700;

var wdh = 720; hgt = 600;
}

else if(screen.width > 800 && screen.height > 600)	{
// wdh = 850;
// hgt = 640;

var wdh = 720; hgt = 600;
}

// Open the window in the middle of the screen
left = (screen.availWidth - wdh) / 2
top = (screen.availHeight - hgt) / 2 - 10;

success = open(url, '', 'width=' + wdh + ',height=' + hgt + ',left=' + left + ',top=' + top + ',scrollbars=yes,resizable=yes,status=yes');

if(!success)	{
var popup = document.getElementById('popup');
popup.style.display='';
alert('Automatic Popup windows are disabled for your browser. You must allow popup windows for the your Lesson to Continue');
return;
}

//var popupok = document.getElementById('popupok');
//popupok.style.display='';

//setTimeout('pollOpener()',100);

}

// If the parent window has closed, log off the account
// function pollOpener() {
//   if (!success.closed)
//     setTimeout('pollOpener()',100);
//   else
//     location.reload();
// }

