var choices = ""
var select1 = ""
var undo1 = ""
var choices1 = ""
var select2 = ""
var undo2 = ""
var basketNo = 0
var logicVal=""
var addVal=""

function theDate() {
day = new Array("Sun","Mon","Tues","Weds","Thurs","Fri","Sat")
month = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
today = new Date()
thisDay = day[today.getDay()]
thisDate = today.getDate()
thisMonth = month[today.getMonth()]
thisYear = today.getFullYear()
thisHour = today.getHours()
thisMin = today.getMinutes()
document.dateDisplay.Date.value=thisDay+', '+thisDate+' '+thisMonth+' '+thisYear
}

{
cost0 = "450.00"
cost1 = "550.00"
cost2 = "600.00"
invoicetext = "Payment to be made within 14 days of invoice date."
var cost = "(NOT SELECTED)"
var prod = "(NOT SELECTED)"
var users = "Not required"
}

function contactUs(v) {
if (v=="")
{alert('Please select a contact from the drop-down menu');
document.getElementById('mailSelect').focus()}
else {
document.getElementById('contactButton').href='mailto:'+v+'@psxdata.co.uk'}
}

function userdef()
	{document.signup.email2.value = users }
	
function writeit()
	{
		document.signup.T1.value = "Your subscription is for a " + prod + " (£" + cost + " plus VAT).  " + invoicetext
		document.signup.email2.value = users
	}

function finalCheck()
	{if (document.signup.Organisation.value == ""||document.signup.Organisation.value == "null"||document.signup.Organisation.value == "undefined")
		{alert('Please can you fill in your Organisation\'s name above')
		document.signup.Organisation.focus()}
		else
	{if (document.signup.email.value == ""||document.signup.email.value == "null"||document.signup.email.value == "undefined")
		{alert('Please can you fill in the Primary User\'s e-mail address above')
		document.signup.email.focus()}
		else
	{if (document.signup.realname.value == ""||document.signup.realname.value == "null"||document.signup.realname.value == "undefined")
		{alert('Please can you fill in the Primary Contact\'s name address above')
		document.signup.realname.focus()}
		else
	{if (document.signup.Address1.value == ""||document.signup.Address1.value == "null"||document.signup.Address1.value == "undefined")
		{alert('Please can you fill in the first line of your address above')
		document.signup.Address1.focus()}
		else
	{if (document.signup.Town.value == ""||document.signup.Town.value == "null"||document.signup.Town.value == "undefined")
		{alert('Please can you fill in the your Postal Town above')
		document.signup.Town.focus()}
		else
	{if (document.signup.Postcode.value == ""||document.signup.Postcode.value == "null"||document.signup.Postcode.value == "undefined")
		{alert('Please can you fill in the Postcode above')
		document.signup.Postcode.focus()}
		else
	{if (document.signup.Tel.value == ""||document.signup.Tel.value == "null"||document.signup.Tel.value == "undefined")
		{alert('Please can you fill in the your telephone number above')
		document.signup.Tel.focus()}
	}}}}}}}

function oneuser()
	{
		prod = "single-user account"
			cost = cost0
			users = "Not required"
		writeit()
	}
function oneuserplus()
	{
		prod = "single-user account plus one other address"
			cost = cost1
			users = ""
		writeit()
	}
	
function multiuser()
	{
		prod = "multi-user account"
		cost = cost2
		users =   "Not required"
writeit() }

function printbutton()
{window.open('http://www.psxdata.co.uk/main/postback.htm','','width=300,height=400')
		window.print()
	}

function showButtons(){
if (document.signup.checkTerms.checked==true)
{document.signup.printbut.style.visibility="visible"
document.signup.B1.style.visibility="visible"}
else
{document.signup.printbut.style.visibility="hidden"
document.signup.B1.style.visibility="hidden"}
}

function fillRecip() {
document.signup.recipient.value=document.signup.who.options[document.signup.who.selectedIndex].value
}

function searchGoogle() {
searchString='http://www.google.co.uk/search?q='+document.siteSearch.terms.value+' '+document.siteSearch.location.value
window.open(searchString)
}

function go(f){
if (f != "none") 
		{
		select1 = f
		undo1 = choices
		choices = choices + select1 + (' ')
		document.selector.subject.value = choices
		keyString = document.selector.subject.value
		keySize = keyString.length
		if (keySize > 59)
			{alert('You have reached the recommended limit for keywords in a single request.\n\nWe suggest that you send this request and start afresh if you want to\nrequest further data.\n\nHowever, you may continue if you wish.')}
		}
	}

function clearbasket()
	{
		choices = ""
		document.selector.subject.value = choices
	}

function deletion()
	{
		choices = document.selector.subject.value
	}

function undo()
	{
		choices = undo1
		document.selector.subject.value = choices
	}

function sendMail()
	{
		if(document.selector.subject.value != "")
			{newWin = window.open('','basket','width=600,height=300')
			newWin.document.write('<HTML><HEAD><TITLE>Your PSX Selection</TITLE>')
			newWin.document.write('<STYLE>')
			newWin.document.write('P {font-family: verdana,Arial,helvetica; font-size: 11px;color: black}')
			newWin.document.write('.border {PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; BORDER-RIGHT: #75c2bc 1px solid; BORDER-TOP: #75c2bc 1px solid; BORDER-LEFT: #75c2bc 1px solid; BORDER-BOTTOM: #75c2bc 1px solid; BACKGROUND-COLOR: #f0f0ff}')
			newWin.document.write('.button {FONT-SIZE: 10px; CURSOR: pointer; CURSOR: hand; COLOR: black; FONT-FAMILY: verdana}')
			newWin.document.write('</STYLE>')
			newWin.document.write('</HEAD><body bgcolor="white">')
			newWin.document.write('<P style="WIDTH: 60px; HEIGHT: 20px; BACKGROUND-COLOR: #75c2bc" class=border><IMG src=../images/autocomplete.gif border=0></P>')
			newWin.document.write('<P class=border><STRONG>Your selected keywords are:</STRONG><br>')
			newWin.document.write(choices)
			newWin.document.write('<br><br><INPUT class=button type=button value="Click" onclick="window.open\(\'mailto:data@psxdata.co.uk?subject='+choices+' &amp;body=Now, simply send this e-mail message, just as it is.\'\)">')
			newWin.document.write(' to <STRONG>automatically create an e-mail request</STRONG> from your registered e-mail account<br><br>If you cannot obviously see a new e-mail message, please check your task bar for a flashing icon.</P>')
			newWin.document.write('<P style="PADDING-LEFT: 4px; WIDTH: 90px; COLOR: white; PADDING-TOP: 2px; FONT-STYLE: italic; HEIGHT: 20px; BACKGROUND-COLOR: #75c2bc"><STRONG>SEND DIRECT</STRONG></P>')
			newWin.document.write('<FORM name=popReq action=http://www.psxdata.co.uk/cgi-bin/form2mail.pl> <INPUT type=hidden name=recipient value=data@psxdata.co.uk><INPUT type=hidden name=subject value="'+choices+'">')
			newWin.document.write('<P class=border>Alternatively, send your request directly now.&nbsp; Please accurately enter your registered<BR>e-mail address: &nbsp;<INPUT type=text name=email>&nbsp; <INPUT type="button" value="Send" onclick="blankAddress\(document.popReq.email\)"></P></FORM>')
			newWin.document.write('<p><b onclick=window.close() style="CURSOR: pointer; CURSOR: hand" onmouseover="this.style.textDecorationUnderline=\'true\'" onmouseout="this.style.textDecorationUnderline=\'\'"> Click here</b> to close and review your selections.</p>')
			newWin.document.write('</BODY></HTML>')}
		else
			{alert('You have not selected any data')}
	}

function noAuto()
	{
		if(document.selector.subject.value != "")
			{newWin = window.open('','basket','width=600,height=330,menubar=yes')
			newWin.document.write('<HTML><HEAD><TITLE>Your PSX Selection</TITLE>')
			newWin.document.write('<STYLE>')
			newWin.document.write('P {font-family: verdana,Arial,helvetica; font-size: 11px;color: black}')
			newWin.document.write('.border {PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; BORDER-RIGHT: #75c2bc 1px solid; BORDER-TOP: #75c2bc 1px solid; BORDER-LEFT: #75c2bc 1px solid; BORDER-BOTTOM: #75c2bc 1px solid; BACKGROUND-COLOR: #f0f0ff}')
			newWin.document.write('.button {FONT-SIZE: 10px; CURSOR: pointer; CURSOR: hand; COLOR: black; FONT-FAMILY: verdana}')
			newWin.document.write('</STYLE>')
			newWin.document.write('</HEAD><body bgcolor="white">')
			newWin.document.write('<FORM name=popReq action=http://www.psxdata.co.uk/cgi-bin/form2mail.pl>')
			newWin.document.write('<P style="PADDING-LEFT: 4px; WIDTH: 90px; COLOR: white; PADDING-TOP: 2px; FONT-STYLE: italic; HEIGHT: 20px; BACKGROUND-COLOR: #75c2bc"><STRONG>E-MAIL</STRONG></P>')
			newWin.document.write('<INPUT type=hidden name=recipient value=data@psxdata.co.uk>')
			newWin.document.write('<P class=border><font face="verdana,Arial,helvetica" size="1" color="black">Your selected keywords are:<br>')
			newWin.document.write('<INPUT type=text name=subject size=80 value="'+choices+'"><BR>If you are not using Internet Explorer v5.0 or better, (see "Help / About Internet Explorer" above), highlight and copy the text in the box above.')
			newWin.document.write('<br><br><INPUT type=button value="Click to create e-mail request" onclick="window.open\(\'mailto:data@psxdata.co.uk?body=Click on the subject line above and use Edit/Paste \(Ctrl + V\) to copy in your keyword\(s\), then send this message as it is.\'\);toCopy\(document.popReq.subject\)"> from your registered e-mail account.')
			newWin.document.write('<br><br>If you cannot obviously see a new e-mail message, please check you task bar for a flashing icon.</P>')
			newWin.document.write('<P style="PADDING-LEFT: 4px; WIDTH: 90px; COLOR: white; PADDING-TOP: 2px; FONT-STYLE: italic; HEIGHT: 20px; BACKGROUND-COLOR: #75c2bc"><STRONG>SEND DIRECT</STRONG></P>')
			newWin.document.write('<P class=border>Alternatively, send your request directly now.  Please accurately enter your registered<BR>e-mail address: &nbsp;<INPUT type=text name=email>&nbsp; <INPUT type="button" value="Send" onclick="blankAddress\(document.popReq.email\)"></P>')
			newWin.document.write('<p><b onclick=window.close() style="CURSOR: pointer; CURSOR: hand" onmouseover="this.style.textDecorationUnderline=\'true\'" onmouseout="this.style.textDecorationUnderline=\'\'"> Click here</b> to close and review your selections.</p></FORM></BODY></HTML>')
			newWin.location.reload()}
		else
			{alert('You have not selected any data')}
	}
	
function toCopy(f) {
f.focus()
document.execCommand('SelectAll')
document.execCommand('Copy')
}

function appSelect() {
if (document.officeApp.appSelector.value=="EQ")
  {location='excel-quick.html'}
if (document.officeApp.appSelector.value=="ED")
  {location='excel-detailed.html'}
if (document.officeApp.appSelector.value=="A")
  {location='access-detailed.html'}
if (document.officeApp.appSelector.value=="W")
  {location='word-merge.html'}
if (document.officeApp.appSelector.value=="N")
  {alert('Please select a Microsoft Office® application')}
}

function checkAdd(a){
checkError = ""
theString = a.value
if (theString != "")
{for (loop=0; loop<theString.length; loop++)
	if (theString.charAt(loop) == "@")
	{checkError = ""
	break}
	else
	{checkError = "Error"}
if (checkError == "Error")
	{alert('This address may not be valid.  It doesn\'t contain an @')
	a.focus()}
}}

function checkAst(a){
checkError = ""
theString = a.value
if (theString != "")
{for (loop=0; loop<theString.length; loop++)
	if (theString.charAt(loop) == "*")
	{checkError = "Error"
	break}
	else
	{checkError = ""}
if (checkError == "Error")
	{alert('Addresses are not valid if they contain an asterisk \(*\)')
	a.focus()}
}}

function blankCheck(f) {
if (f.value=="")
  {alert('All fields must be filled in')
  f.focus()}
}

function blankAddress(f) {
if (f.value=="")
  {alert('Please add your e-mail address')
  f.focus()}
  else
  {document.popReq.submit()}
}

function genAddress() {
banned= new Array("compuserve.com","ntlworld.com","blueyonder.co.uk","hotmail.com","hotmail.co.uk","orange.net","yahoo.com","btinternet.com","btconnect.com","btopenworld.com","aol.com","talk21.com","virgin.net")                                    
bannedLen=banned.length
multi1=document.changeReg.email.value
multiArray=multi1.split("@")

for (b=0; b<=bannedLen; b++)
	{if(multiArray[1] == banned[b])
	{alert('This domain name is not allowed for this service')
	document.changeReg.subject.value=""
	document.changeReg.email.focus()
	break}
	else
	{document.changeReg.subject.value='*@'+multiArray[1]}}
}

function newLogin(n) {
L='http://www.psxdata.co.uk/cgi-bin/locked.cgi?'+n
document.getElementById('mainFrame').src=L
}

function subLogin(u,p) {
L='http://'+u+':'+p+'@www.psxdata.co.uk/secure/'
window.open(L,'','scrollbars=1,status=1,resizable=1')
document.title='Subscribers Area'
}

function newWin(L) {
window.open(L,'','width=450,height=600,scrollbars=1')
}

function wideWin(L) {
window.open(L,'','width=600,height=450,scrollbars=1')
}
	
// Dynamic Selector processes
function data2Go(v,n,i,d,c) {
// v = field value, n = field name, i = array position, d = display field, c = code field
if (v!="") {
if (n=="types" && i<="8"){n="data_type"}
else
if (n=="types"){n="org_type"}
if (n=="catSects" && i<="6"){n="all_sects"}
else
if (n=="catSects"){n="all_cats"}
if (logicVal==""){document.selector.logic.value=""}
else
{document.selector.logic.value=" .or."}
//Add choices
		select1 = document.selector.logic.value+' "'+v+'" $'+n+';\n'
		select2 = v+',\n'
		undoLogic = logicVal
		undo1 = choices
		undo2 = choices1
		choices = choices + select1
		choices1 = choices1 + select2
		c.value = choices
		d.value = choices1
		prevLogicVal=logicVal
		logicVal=n
		Xaddval=addVal
		addVal=v
if (Xaddval==addVal)
		{alert('Error: Your current choice matches previous one.\nIgnoring this choice.')
		logicVal=prevLogicVal
		choices = undo1
		choices1 = undo2
		c.value = undo1
		d.value = undo2}
}}

function undoLast(d,c) {
// d = display field, c = code field
		logicVal = undoLogic
		choices = undo1
		choices1 = undo2
		c.value = undo1
		d.value = undo2
}

function goData() {
if(document.selector.subject.value == "")
alert('You have not selected any data')
}
	
function typeSelector(v) {
if (v==1)
{document.selector.types.disabled=false
document.selector.plus1.disabled=false}
if (v==0)
{document.selector.types.disabled=true
document.selector.plus1.disabled=true
defaultType()}	}

function funcSelector(v) {
if (v==1)
{document.selector.catSects.disabled=false
document.selector.plus2.disabled=false}
if (v==0)
{document.selector.catSects.disabled=true
document.selector.plus2.disabled=true
defaultFunc()}	}

function seniorSelector(v) {
if (v==1)
{document.selector.seniority.disabled=false
document.selector.plus3.disabled=false}
if (v==0)
{document.selector.seniority.disabled=true
document.selector.plus3.disabled=true
defaultSenior()}	}

function regionSelector(v) {
if (v==1)
{document.selector.region.disabled=false
document.selector.plus4.disabled=false}
if (v==0)
{document.selector.region.disabled=true
document.selector.plus4.disabled=true
defaultRegion()}	}

function dsfocus1() {
if (document.selector.email.value=="")
{alert('Please complete your e-mail address')
document.selector.email.focus()}
else {
choices = ""
choices1 = ""
undo1 = ""
undo2 = ""
logicVal= ""
document.selector.logic.value=""
document.selector.allButton.disabled=true
document.selector.startLabel.src="startg.jpg"
document.selector.typeLabel.src="typer.jpg"
typeCell.className="redbox"
document.selector.clearType.style.visibility="visible"
document.selector.undoType.style.visibility="visible"
document.selector.selectType[0].disabled=false
document.selector.selectType[1].disabled=false
document.selector.next2.disabled=false}
}

function dsfocus2() {
if(addVal!=document.selector.types.value)
{d1=confirm('The current selection is not the same as the last one added.\n\nPress OK to continue, or Cancel to return\nand add the last selection')
if(d1==false)
{document.selector.plus1.focus()}}
else {
choices = ""
choices1 = ""
undo1 = ""
undo2 = ""
logicVal= ""
addVal=""
document.selector.logic.value=""
document.selector.next2.disabled=true
document.selector.clearType.style.visibility="hidden"
document.selector.undoType.style.visibility="hidden"
document.selector.typeLabel.src="typeg.jpg"
document.selector.funcLabel.src="functionr.jpg"
typeCell.className="baseline"
funcCell.className="redbox"
document.selector.clearFunc.style.visibility="visible"
document.selector.undoFunc.style.visibility="visible"
document.selector.types.disabled=true
document.selector.plus1.disabled=true
document.selector.selectType[0].disabled=true
document.selector.selectType[1].disabled=true
document.selector.selectFunc[0].disabled=false
document.selector.selectFunc[1].disabled=false
document.selector.next3.disabled=false}
}

function dsfocus3() {
if(addVal!=document.selector.catSects.value)
{d1=confirm('The current selection is not the same as the last one added.\n\nPress OK to continue, or Cancel to return\nand add the last selection')
if(d1==false)
{document.selector.plus2.focus()}}
else {
choices = ""
choices1 = ""
undo1 = ""
undo2 = ""
logicVal= ""
addVal=""
document.selector.logic.value=""
document.selector.next3.disabled=true
document.selector.clearFunc.style.visibility="hidden"
document.selector.undoFunc.style.visibility="hidden"
document.selector.funcLabel.src="functiong.jpg"
document.selector.seniorLabel.src="seniorityr.jpg"
funcCell.className="baseline"
seniorCell.className="redbox"
document.selector.clearSenior.style.visibility="visible"
document.selector.undoSenior.style.visibility="visible"
document.selector.catSects.disabled=true
document.selector.plus2.disabled=true
document.selector.selectFunc[0].disabled=true
document.selector.selectFunc[1].disabled=true
document.selector.selectSenior[0].disabled=false
document.selector.selectSenior[1].disabled=false
document.selector.next4.disabled=false}
}

function dsfocus4() {
if(addVal!=document.selector.seniority.value)
{d1=confirm('The current selection is not the same as the last one added.\n\nPress OK to continue, or Cancel to return\nand add the last selection')
if(d1==false)
{document.selector.plus3.focus()}}
else {
choices = ""
choices1 = ""
undo1 = ""
undo2 = ""
logicVal= ""
addVal=""
document.selector.logic.value=""
document.selector.next4.disabled=true
document.selector.clearSenior.style.visibility="hidden"
document.selector.undoSenior.style.visibility="hidden"
document.selector.seniorLabel.src="seniorityg.jpg"
document.selector.regionLabel.src="regionr.jpg"
seniorCell.className=""
regionCell.className="redbox"
document.selector.clearRegion.style.visibility="visible"
document.selector.undoRegion.style.visibility="visible"
document.selector.seniority.disabled=true
document.selector.plus3.disabled=true
document.selector.selectSenior[0].disabled=true
document.selector.selectSenior[1].disabled=true
document.selector.selectRegion[0].disabled=false
document.selector.selectRegion[1].disabled=false
document.selector.next5.disabled=false}
}

function dsfocus5() {
if(addVal!=document.selector.region.value)
{d1=confirm('The current selection is not the same as the last one added.\n\nPress OK to continue, or Cancel to return\nand add the last selection')
if(d1==false)
{document.selector.plus4.focus()}}
else {
choices = ""
choices1 = ""
undo1 = ""
undo2 = ""
logicVal= ""
addVal=""
document.selector.logic.value=""
document.selector.next4.disabled=true
document.selector.clearRegion.style.visibility="hidden"
document.selector.undoRegion.style.visibility="hidden"
document.selector.regionLabel.src="regiong.jpg"
document.selector.delLabel.src="deliveryr.jpg"
regionCell.className=""
delCell.className="redbox"
document.selector.region.disabled=true
document.selector.plus4.disabled=true
document.selector.fileFormat.disabled=false
document.selector.subButton.disabled=false
document.selector.selectRegion[0].disabled=true
document.selector.selectRegion[1].disabled=true
document.selector.next5.disabled=true}
}

function defaultType() {
zeroAll()
document.selector.typeCode.value=''
document.selector.typeList.value=''
document.selector.types.value=document.selector.types.options[0].value
}

function defaultFunc() {
zeroAll()
document.selector.funcCode.value=''
document.selector.funcList.value=''
document.selector.catSects.value=document.selector.catSects.options[0].value
}

function defaultSenior() {
zeroAll()
document.selector.seniorCode.value=''
document.selector.seniorList.value=''
document.selector.seniority.value=document.selector.seniority.options[0].value
}

function defaultRegion() {
zeroAll()
document.selector.regionCode.value=''
document.selector.regionList.value=''
document.selector.region.value=document.selector.region.options[0].value
}

//function requestAll() {
//if(document.selector.email.value=="")
//{alert('Please complete your e-mail address')
//document.selector.email.focus()}
//else
//{document.selector.subject.value="All"
//document.selector.dbCode.value="Code=All"
//document.selector.recipient.value="data@psxdata.co.uk"
//document.selector.redirect.value="http://www.psxdata.co.uk/secure/selector-ty.html"
//document.selector.submit()}
//}

function requestAll(type) {
var theType=confirm("Submit your request for the whole database in "+type+" format?")
if (theType==true) {
document.selector.subject.value="ALL_"+type
document.selector.dbCode.value="Code=ALL_"+type
document.selector.recipient.value="data@psxdata.co.uk"
//document.selector.redirect.value="http://www.psxdata.co.uk/secure/selector-ty.html"
document.selector.submit()}
else
{document.selector.allButton.value=document.selector.allButton.options[0].value
document.selector.allButton.focus()}
}

function submitQ() {
if (document.selector.typeCode.value=='')
	{C1='copy to PSX1\n'}
	else
	{C1='copy to PSX1 for;\n'+document.selector.typeCode.value}
if (document.selector.funcCode.value=='')
	{C2='\nuse PSX1\ncopy to PSX2\n'}
	else
	{C2='\nuse PSX1\ncopy to PSX2 for;\n'+document.selector.funcCode.value}
if (document.selector.seniorCode.value=='')
	{C3='\nuse PSX2\ncopy to PSX3\n'}
	else
	{C3='\nuse PSX2\ncopy to PSX3 for;\n'+document.selector.seniorCode.value}
if (document.selector.regionCode.value=='')
	{C4='\nuse PSX3\ncopy to PSX4\n'}
	else
	{C4='\nuse PSX3\ncopy to PSX4 for;\n'+document.selector.regionCode.value}
refGen()
document.selector.subject.value=document.selector.fileFormat.value+' '+Ref
document.selector.dbCode.value=C1+C2+C3+C4+'\n'
//alert(C1+C2+C3+C4+'\n')
document.selector.submit()
writeSelect()}

function writeSelect() {
newWin = window.open('','','width=600,height=500,menubar=1,toolbar=1')
newWin.document.write('<HTML><HEAD><meta http-equiv="Content-Language" content="en-gb"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><TITLE>Your PSX Selection</TITLE>')
newWin.document.write('<STYLE>')
newWin.document.write('P {font-family: verdana,Arial,helvetica; font-size: 11px;color: black}')
newWin.document.write('.border {PADDING: 2px; BORDER: #7788a7 1px solid; BACKGROUND-COLOR: #C8D2D2}')
newWin.document.write('.button {FONT-SIZE: 10px; CURSOR: pointer; CURSOR: hand; COLOR: black; FONT-FAMILY: verdana}')
newWin.document.write('</STYLE>')
newWin.document.write('</HEAD><body bgcolor="white">')
newWin.document.write('<P><img src="../images/logobanner.jpg" border="0"></P>')
newWin.document.write('<p class=border><STRONG>DATA SELECTION RECEIPT</STRONG></p>')
newWin.document.write('<p class=border><STRONG>Process date: &nbsp;</STRONG>')
newWin.document.write(document.dateDisplay.Date.value+'</p>')
newWin.document.write('<p class=border><STRONG>Types: &nbsp;</STRONG>')
newWin.document.write(document.selector.typeList.value+'</p>')
newWin.document.write('<p class=border><STRONG>Functions: &nbsp;</STRONG>')
newWin.document.write(document.selector.funcList.value+'</p>')
newWin.document.write('<p class=border><STRONG>Seniority: &nbsp;</STRONG> ')
newWin.document.write(document.selector.seniorList.value+'</p>')
newWin.document.write('<p class=border><STRONG>Regions: &nbsp;</STRONG> ')
newWin.document.write(document.selector.regionList.value+'</p>')
newWin.document.write('<p class=border><STRONG>Your file reference is: &nbsp;</STRONG>')
newWin.document.write(Ref+'.zip, containing '+Ref+'.'+document.selector.fileFormat.value+'</p>')
newWin.document.write('<p class=border><STRONG>Delivery address: &nbsp;</STRONG>')
newWin.document.write(document.selector.email.value+'</p>')
newWin.document.write('<p>You may find it helpful to <strong onclick="window.location.reload();self.print()" style="CURSOR: pointer; CURSOR: hand" onmouseover="this.style.textDecorationUnderline=\'true\'" onmouseout="this.style.textDecorationUnderline=\'\'">print</strong> this listing.<br>For help, please contact our <a href="mailto:support@psxdata.co.uk?subject=Ref: '+Ref+'" style="color: #000000; text-decoration: none; font-weight: bold" onmouseover="this.style.textDecorationUnderline=\'true\'" onmouseout="this.style.textDecorationUnderline=\'\'">support team</a><br>')
newWin.document.write('Please quote the above reference for assistance with this request.</p>')
newWin.document.write('<p><strong onclick="window.close()" style="CURSOR: pointer; CURSOR: hand" onmouseover="this.style.textDecorationUnderline=\'true\'" onmouseout="this.style.textDecorationUnderline=\'\'"> Click here</strong> to close this window.</p>')
newWin.document.write('</BODY></HTML>')
}

function refGen() {
Ref=''
for (r=1; r<=8; r++)
{n=Math.round(Math.random()*9)
Ref=Ref+n}
}

function zeroAll() {
choices = ""
select1 = ""
undo1 = ""
choices1 = ""
select2 = ""
undo2 = ""
logicVal=""
addVal=""
}

function showCode() {
if (document.selector.typeCode.value=='')
	{C1='copy to PSX1\n'}
	else
	{C1='copy to PSX1 for;\n'+document.selector.typeCode.value}
if (document.selector.funcCode.value=='')
	{C2='\nuse PSX1\ncopy to PSX2\n'}
	else
	{C2='\nuse PSX1\ncopy to PSX2 for;\n'+document.selector.funcCode.value}
if (document.selector.seniorCode.value=='')
	{C3='\nuse PSX2\ncopy to PSX3\n'}
	else
	{C3='\nuse PSX2\ncopy to PSX3 for;\n'+document.selector.seniorCode.value}
if (document.selector.regionCode.value=='')
	{C4='\nuse PSX3\ncopy to PSX4\n'}
	else
	{C4='\nuse PSX3\ncopy to PSX4 for;\n'+document.selector.regionCode.value}
refGen()
document.selector.subject.value=document.selector.fileFormat.value+' '+Ref
document.selector.dbCode.value=C1+C2+C3+C4+'\n'
alert(C1+C2+C3+C4+'\n')
}

function showPage(p) {
document.getElementById('mainFrame').src=p+".html"
}

function pickMethod(pk) {
if(document.selector.email.value=="")
{alert('Please complete your e-mail address')
document.selector.allButton.value=document.selector.allButton.options[0].value
document.selector.email.focus()}
else
{if (pk==""){alert('No method selected'); document.selector.allButton.focus()}
if (pk=="CSV" || pk=="TXT") {requestAll(pk)}
if (pk=="custom") {dsfocus1()}}
}
