heightSMALL = 300;
widthSMALL = 600;
posXS = (screen.width/2 - widthSMALL/2).toString();
posYS = (screen.height/2 - heightSMALL/2).toString();

function openSMALL(URLStr)
	{ var w = window.open(URLStr,"_blank","height=" + heightSMALL + ",width=" + widthSMALL + ",top=" + posYS + ",left=" + posXS + ",screenX=" + posXS + ",screenY=" + posYS + ",menubar=no,resizable=yes,scrollbars=yes");
	  return void(0); }

heightBIG = 450;
widthBIG = 700;
posXB = (screen.width/2 - widthBIG/2).toString();
posYB = (screen.height/2 - heightBIG/2).toString();

function openBIG(URLStr)
	{ var w = window.open(URLStr,"_blank","height=" + heightBIG + ",width=" + widthBIG + ",top=" + posYB + ",left=" + posXB + ",screenX=" + posXB + ",screenY=" + posYB + ",menubar=no,resizable=yes,scrollbars=yes");
	  return void(0); }

heightCOLOUR = 197;
widthCOLOUR = 600;
posXC = (screen.width/2 - widthCOLOUR/2).toString();
posYC = (screen.height/2 - heightCOLOUR/2).toString();

function openCOLOUR(URLStr)
	{ var w = window.open("getcolour.php","_blank","height=" + heightCOLOUR + ",width=" + widthCOLOUR + ",top=" + posYC + ",left=" + posXC + ",screenX=" + posXC + ",screenY=" + posYC + ",menubar=no,resizable=no,scrollbars=no");
	  return void(0); }

function openWindow(URLStr,w,h)
	{ posXC = (screen.width/2 - w/2).toString();
	  posYC = (screen.height/2 - h/2).toString();
	  var w = window.open(URLStr,"_blank","height=" + h + ",width=" + w + ",top=" + posYB + ",left=" + posXB + ",screenX=" + posXB + ",screenY=" + posYB + ",menubar=no,resizable=yes,scrollbars=yes");
	  return void(0); }
	  
var isNS = 0;
var isIE = 0;
var docObj, styleObj;

if (navigator.appName == "Netscape")
	{ isNS = 1; } else { isIE = 1; }

docObj = (isNS) ? "document." : "document.all.";
styleObj = (isNS) ? "" : ".style";

function drawMAP(m,w,h) {	
	document.write('<object type="application/x-shockwave-flash" data="images/map' + m + '.swf" width="' + w + '" height="' + h + '">\n');
	document.write('<param name="movie" value="images/map' + m + '.swf" />\n');
	document.write('<param name="loop" value="false">\n');
	document.write('<param name="quality" value="best">\n');
	document.write('<param name="scale" value="showall">\n');
	document.write('<param name="wmode" value="opaque">\n');
	document.write('<param name="menu" value="false">\n');
	document.write('</object>\n');
}

function emailCheck(emailStr)
	{ var emailPat = /^(.+)@(.+)$/;
	  var specialChars = "\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
	  var validChars = "\[^\\s" + specialChars + "\]";
	  var quotedUser = "(\"[^\"]*\")";
	  var ipDomainPat = /^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	  var atom = validChars + '+';
	  var word = "(" + atom + "|" + quotedUser + ")";
	  var userPat = new RegExp("^" + word + "(\\." + word + ")*$");
	  var domainPat = new RegExp("^" + atom + "(\\." + atom +")*$");
	  
	  var matchArray = emailStr.match(emailPat);
	  if (matchArray == null) return false;

	  var user = matchArray[1];
	  var domain = matchArray[2];
	  
	  if (user.match(userPat) == null) return false;

	  var IPArray = domain.match(ipDomainPat);
	  if (IPArray != null)
	  	{ for (var i = 1; i <= 4; i++)
			{ if (IPArray[i] > 255) return false; }
		  return true; }

	  var domainArray = domain.match(domainPat);
	  if (domainArray == null) return false;

	  var atomPat = new RegExp(atom,"g");
	  var domArr = domain.match(atomPat);
	  var len = domArr.length;
	  if (domArr[domArr.length-1].length < 2 || domArr[domArr.length-1].length > 3) return false;

	  if (len < 2) return false;

	  return true; }