<!--
	function popup(file_name) { 
	// function: popup(file_name) opens sized window 
	// variable: pass in the page you want to load in the popup window
	// example: <a href="javascript:popup('anypage.asp');">link text</a> 
		var page = file_name;
		// zzz is used to work around ampersands
		newstr = page.replace(/zzz/i,"%26");
		window.open(newstr,"popup","width=500,height=480,scrollbars=yes,resizable=no");
	}
	
	function popuptesthelp(file_name) { 
	// function: popup(file_name) opens sized window 
	// variable: pass in the page you want to load in the popup window
	// example: <a href="javascript:popup('anypage.asp');">link text</a> 
		var page = file_name;
		// zzz is used to work around ampersands
		newstr = page.replace(/zzz/i,"%26");
		window.open(newstr,"popup","width=400,height=400,scrollbars=yes,resizable=yes");
	}
	
	function popuppbHelp(file_name) { 
	// function: popup(file_name) opens sized window 
	// variable: pass in the page you want to load in the popup window
	// example: <a href="javascript:popupppHelp('anypage.asp');">link text</a> 
		var page = file_name;
		// zzz is used to work around ampersands
		newstr = page.replace(/zzz/i,"%26");
		window.open(newstr,"popup","width=460,height=600,scrollbars=yes");
	}
	function popupcustom(file_name,wwidth,hheight) { 
	// function: popup(file_name) opens sized window 
	// variable: pass in the page you want to load in the popup window
	// example: <a href="javascript:popupppHelp('anypage.asp');">link text</a> 
		var page = file_name;
		var w =  wwidth;
		var h = hheight;
		var sWindowChar = "width=" + w + ",height=" + h + ",scrollbars=yes";
		// zzz is used to work around ampersands
		newstr = page.replace(/zzz/i,"%26");
		 window.open(newstr,"popup", sWindowChar);
		//alert(sWindowChar);
	}
	function printpage(docid) { 
	// function: printpage(docid) opens sized window 
	// variable: pass in the pageid of the topic you want display ready for printing
	// example: <a href="javascript:printpage('43');">Print</a> 
		//var page = file_name;
		// zzz is used to work around ampersands
		//newstr = page.replace(/zzz/i,"%26");
		window.open("printtopic.asp?docid=" + docid,"print","toolbar=no,location=no,status=no,menubar=no,width=550,height=500,scrollbars=yes,resize=yes")
	}

	function addDocumentURL(){
	// function: addDocumentURL() sets the page to which a form submits 
	// example: <form onsubmit="addDocumentURL()" method="get">
		var sDesc = document.frmAddDoc.txtDesc.value;
		var sURL = "process.asp?Mode=AddDocument&Desc=" + sDesc;
		document.frmAddDoc.action = sURL
	}
	
	function LinkTo(url){
	// function: LinkTo(url) once event is fired transfers to another page
	// variable url: the page you want to transfer to
	// example : onmouseup="LinkTo('anypage.asp');"
			location.href = url;
		}
	
	function checkTextAreaLength(obj,maxSize){
	// function: checkTextAreaLength(obj,maxSize) restricts number of characters in a text input/ textarea field
	// variable obj : use 'this' to define teh current object
	// variable maxSize : number of charcters you want to restrict field to
	// example : onkeyup="checkTextAreaLength(this,255);"
		var charLength = obj.value;
		if (charLength.length > maxSize) {
			obj.innerText = charLength.slice(0,-1);
			}
	}
	function automsg()
	// creates a pop-up for auto-login
	{if (document.frmUserDetails.auto_login.checked)if (!confirm("If you tick this box then you will no longer need to log in\n"+"when visting Consumer Online from this computer.\n\n"+"You can turn off this feature at any time by logging out.\n\n"+"Your browser must be set to accept permanent cookies\n"+"for this feature to work.\n\n"+"Don't use this option unless you are the only person\nwho has access to this computer.\n\n"+"REMEMBER:\n"+"You are responsible for ensuring there is no unauthorised \nuse of Consumer Online under your username and password.   "))document.frmUserDetails.auto_login.checked = false;
	
	}

	
	
	function cc(){
	// cc() this changes the value of a hidden field in a form to "true" so we know java script is enabled
			document.form1.jvon.value ="true"
	}
	
//-->

