function popup(sURL, sWindowName)
{
  var nWindowWidth = 540;
var nWindowHeight = 630;
var nScreenWidth = screen.width;
var nScreenHeight = screen.height;
var nLeft = parseInt((nScreenWidth-nWindowWidth)/2);
var nTop = parseInt((nScreenHeight-nWindowHeight)/2);
window.open(sURL, sWindowName, "width=" + nWindowWidth + ",height=" + nWindowHeight + ",scrollbars=yes,top=" + nTop + ",left=" + nLeft);
return true;
}
function popup_trades(sURL, sWindowName)
{
  var nWindowWidth = 800;
var nWindowHeight = 700;
var nScreenWidth = screen.width;
var nScreenHeight = screen.height;
var nLeft = parseInt((nScreenWidth-nWindowWidth)/2);
var nTop = parseInt((nScreenHeight-nWindowHeight)/2);
window.open(sURL, sWindowName, "width=" + nWindowWidth + ",height=" + nWindowHeight + ",scrollbars=yes,top=" + nTop + ",left=" + nLeft);
return true;
}
/*Password*/
function checkPw(form) {
pw1 = form.txtUserPass.value;
pw2 = form.txtUserPass2.value;

if (pw1 != pw2) {
alert ("\nThe passwords you entered do not match please re-enter your password.")
return false;
}
else return true;
}
/*Reg Form*/
function checkReg(form) {
pw1 = form.password.value;
pw2 = form.password2.value;
email = form.Sect1_6.value;
postcode= form.Sect1_7d.value;

if (pw1 != pw2) {
alert ("\nThe passwords you entered do not match please re-enter your password.")
return false;
}
else if (pw1.match(/^\s*$/)) {
alert ("\nThe password field was empty, please input a password.")
return false;
}
else return true;
}
/*Links*/
function JumpToIt(frm) {
    var newPage = frm.url.options[frm.url.selectedIndex].value
    if (newPage != "None") {
        location.href=newPage
    }
}
