 

///////////////////////////////////////////
// Document Download //////////////////////
///////////////////////////////////////////
function download() {
	location.href = "/download.cfm?documentid=" + arguments[0];
	}
function verify(str, file) {
	var agree=confirm(str);
	if (agree) {
		location.href = "/download.cfm?documentid=" + file;
		}
	}
///////////////////////////////////////////


///////////////////////////////////////////
// Search Form Validation /////////////////
///////////////////////////////////////////
function setSearchboxValue() {
	var obj = arguments[0];
	if (obj.value.replace(/[ ]/g, "") == "") {
		obj.value = "Search";
		}
	}
	
function validateSearchForm() {
	var formObj	= arguments[0];
	if (formObj.keyword.value.replace(/[ ]/g, "") == "" || formObj.keyword.value.toLowerCase() == "search") {
		alert("Enter a word or phrase to search.      "); 
		return false;
		}
	}
///////////////////////////////////////////


	branches = {
				"qld" 	: {
					"branch" 	: "Queensland",
					"contact" 	: "Cameron Thiele<br />Branch Secretary<br />CEPU<br />Queensland Communications Division Branch",
					"address" 	: "Reply Paid 3203<br />SOUTH BRISBANE&nbsp;&nbsp;&nbsp;QLD&nbsp;&nbsp;&nbsp;4101",
					"fax" 		: "(07) 3255 0020",
					"email"		: "<a href='mailto:kerrit@cepuqld.asn.au?subject=Membership application from the CEPUConnects.org website'>kerrit@cepuqld.asn.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},
					
				"nswpt"	: {
					"branch" 	: "NSW P&amp;T",
					"contact" 	: "Jim Metcher<br />Branch Secretary<br />CEPU<br />NSW Postal & Telecommunications Branch",
					"address" 	: "Reply Paid 62032<br />PARRAMATTA&nbsp;&nbsp;&nbsp;NSW&nbsp;&nbsp;&nbsp;2124",
					"fax" 		: "(02) 9893 7396",
					"email"		: "<a href='mailto:admina@cepu.org?subject=Membership application from the CEPUConnects.org website'>admina@cepu.org</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},
				
				
				"nswtp" : {
					"branch" 	: "NSW T&amp;S",
					"contact" 	: "Ian McCarthy<br />Branch Secretary<br />CEPU<br />NSW Telecommunications &amp Services Branch",
					"address" 	: "Reply Paid 66855<br />SYDNEY&nbsp;&nbsp;&nbsp;NSW&nbsp;&nbsp;&nbsp;2000",
					"fax" 		: "(02) 9281 9494",
					"email"		: "<a href='mailto:cepunsw@bigpond.net.au?subject=Membership application from the CEPUConnects.org website'>cepunsw@bigpond.net.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},
					
				"vicpt" : {
					"branch" 	: "Vic P&amp;T",
					"contact" 	: "Ms Joan Doyle<br />Branch Secretary<br />CEPU<br />Victorian Postal &amp; Telecommunications Branch",
					"address" 	: "Reply Paid 83678<br />NORTH MELBOURNE&nbsp;&nbsp;&nbsp;VIC&nbsp;&nbsp;&nbsp;3051",
					"fax" 		: "(03) 9600 9133",
					"email"		: "<a href='mailto:cdptvic@cepu.asn.au?subject=Membership application from the CEPUConnects.org website'>cdptvic@cepu.asn.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},

				"victs" : {
					"branch" 	: "Vic T&amp;S",
					"contact" 	: "Len Cooper<br />Branch Secretary<br />CEPU<br />Victorian Telecommunications &amp; Services Branch",
					"address" 	: "Reply Paid 62092<br />CARLTON&nbsp;&nbsp;&nbsp;VIC&nbsp;&nbsp;&nbsp;3053",
					"fax" 		: "(03) 9349 3488",
					"email"		: "<a href='mailto:cdtsvic@victs.cepu.asn.au?subject=Membership application from the CEPUConnects.org website'>cdtsvic@victs.cepu.asn.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},
				
				"tas" 	: {
					"branch" 	: "Tasmania",
					"contact" 	: "Peter Miller<br />Branch Secretary<br />CEPU<br />Tasmanian Communications Division Branch",
					"address" 	: "Reply Paid 77526<br />NEW TOWN&nbsp;&nbsp;&nbsp;TAS&nbsp;&nbsp;&nbsp;7008",
					"fax" 		: "(0362) 28 7557",
					"email"		: "<a href='mailto:cdtas@cepu.asn.au?subject=Membership application from the CEPUConnects.org website'>cdtas@cepu.asn.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},
				
				"sant" 	: {
					"branch" 	: "SA/NT",
					"contact" 	: "Graham Lorrain<br />Branch Secretary<br />CEPU<br />SA/NT Communications Division Branch",
					"address" 	: "Reply Paid 64514<br />ADELAIDE&nbsp;&nbsp;&nbsp;SA&nbsp;&nbsp;&nbsp;5000",
					"fax" 		: "(08) 8332 5990",
					"email"		: "<a href='mailto:cdsant@cepu.asn.au?subject=Membership application from the CEPUConnects.org website'>cdsant@cepu.asn.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Terms and Conditions</a>"
					},

				"wa" 	: {
					"branch" 	: "WA",
					"contact" 	: "Bryan Watkins<br />Branch Secretary<br />CEPU<br />WA Communications Division Branch",
					"address" 	: "Reply Paid 8354<br />PERTH BC&nbsp;&nbsp;&nbsp;WA&nbsp;&nbsp;&nbsp;6849",
					"fax" 		: "(08) 9227 9397",
					"email"		: "<a href='mailto:cwuwa@iinet.net.au?subject=Membership application from the CEPUConnects.org website'>cwuwa@iinet.net.au</a>",
					"terms"		: "<a href='GeneralTermsandConditions.pdf'>Click here</a>"
					}
				}
				
				
	function loadBranch() {
		if (arguments[0] == "")
			return
		document.getElementById("step2").getElementsByTagName("A")[0].href = "/files/File/member-forms/" + arguments[0] + "-2008 member form.pdf";
		document.getElementById("step2").style.display = "";
		document.getElementById("step3").style.display = "";
		document.getElementById("step4").style.display = "";
		
		document.getElementById("branch-info").innerHTML = "<p>You can choose to <strong>post</strong>, <strong>email</strong> or <strong>fax</strong> your <strong>signed</strong> registration form to the " + branches[arguments[0]].branch + 
					" Branch. Their details are as follows:</p><p>" + 
					branches[arguments[0]].contact + "<br />" + 
					"<h3>Address</h3>" + branches[arguments[0]].address + "<br />" + 
					"<h3>Email</h3>" + branches[arguments[0]].email + "<br />" + 
					"<h3>Fax</h3>" + branches[arguments[0]].fax + "<br />" + 
					"<br /><em>Please note, you should read our terms and conditions of membership before you signup. " + branches[arguments[0]].terms + " to read now.</em>"+ 
					"</p>";
		
		}