// JavaScript Document
function testCookies() {
	var uniq = 'notyours'+new Date().getTime()+''
	success = Cookie.set('mycookie',uniq)
	if (!success) {
		success = Cookie.set('mycookie','notyours, I insist!')
		return
	}
	var s = Cookie.get('mycookie')
	if (s!=uniq) {
		return
	}
	var cookie = readCookie('user');
  			if(!cookie){
				var str='';
				str+='<form name="form1" class="search-form">';
				str+='<label for="info">';
				str+='<p>Select your profession or area of interest from the list below.<\/p>';
				str+='<\/label>';
				str+='  			<select name="info">';
				str+='    			<option value="content\/info\/individual\/individual.htm">Individual<\/option>';
				str+='    			<option value="content\/info\/caring\/caring.htm">Caring<\/option>';
				str+='    			<option value="content\/info\/commercial-employer\/commercial-employer.htm">Employer<\/option>';
				str+='    			<option value="content\/info\/education\/education.htm">Education<\/option>';
				str+='    			<option value="content\/info\/funder\/funder.htm">Funder<\/option>';
				str+='    			<option value="content\/info\/health\/health.htm">Health<\/option>';
				str+='    			<option value="content\/info\/IT\/IT.htm">IT<\/option>';
				str+='    			<option value="content\/info\/parent\/parent.htm">Parent<\/option>';
				str+='    			<option value="content\/info\/public-access\/public_access.htm">Public Access<\/option>';
				str+='    			<option value="content\/info\/web\/web.htm">Web<\/option>';
				str+='  			<\/select>';
				str+='  			<input type="button" name="Button1" value="Go" onClick="MM_jumpMenuGo(\'info\',\'parent\',0)">';
				str+='		  <\/form>';
				document.write(str);
				}else
					{
						theDay=cookie
						switch (theDay)
						{
							case 'Individual':
							var str='';
							str+='<a href="content\/info\/individual\/individual.htm">Essential information for Others<\/a>';
							document.write(str);
  							break
							case 'Parent':
							var str='';
							str+='<a href="content\/info\/parent\/parent.htm">Essential information for Parents<\/a>';
							document.write(str);
  							break
							case 'Commercial_Employer':
							var str='';
							str+='<a href="content\/info\/commercial-employer\/commercial-employer.htm">Essential information for Commercial Employers<\/a>';
							document.write(str);
  							break
							case 'Voluntary_sector_Employer':
							var str='';
							str+='<a href="content\/info\/voluntary-employer\/voluntary-employer.htm">Essential information for Voluntary Sector Employers<\/a>';
							document.write(str);
  							break
							case 'Public_sector_Employer':
							var str='';
							str+='<a href="content\/info\/public-employer\/public-employer.htm">Essential information for Public Sector Employers<\/a>';
							document.write(str);
  							break
							case 'Health_Sector_Employer':
							var str='';
							str+='<a href="content\/info\/health\/health.htm">Essential information for Health Sector Employers<\/a>';
							document.write(str);
  							break
							case 'Education_Professional':
							var str='';
							str+='<a href="content\/info\/education\/education.htm">Essential information for Education Professionals<\/a>';
							document.write(str);
  							break
							case 'Caring_Professional':
							var str='';
							str+='<a href="content\/info\/caring\/caring.htm">Essential information for Caring Professional<\/a>';
							document.write(str);
  							break
							case 'IT_Professional':
							var str='';
							str+='<a href="content\/info\/IT\/IT.htm">Essential information for IT Professionals<\/a>';
							document.write(str);
  							break
							case 'Web_Professional':
							var str='';
							str+='<a href="content\/info\/web\/web.htm">Essential information for Web Professionals<\/a>';
							document.write(str);
  							break
							case 'Public_access':
							var str='';
							str+='<a href="content\/info\/public-access\/public_access.htm">Essential information for Public Access Centres<\/a>';

							document.write(str);
  							break
							case 'Funder_or_Sponsor':
							var str='';
							str+='<a href="content\/info\/funder\/funder.htm">Essential information for Funders or Sponsors<\/a>';
							document.write(str);
  							break
							default:
							var str='';
							str+='<a href="content\/info\/individual\/individual.htm">Essential information for you<\/a>';
							document.write(str);
						}
					}
}
function readCookie(name) {
  var nameEQ = name + '=';
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}
function eraseCookieRedir(name) {
    alert('You are going to alter your registration');
	createCookie(name,'',-1);
	window.location='http://www.abilitynet.org.uk/cgi-bin/database/ccounter.cgi';
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
function searchFocus(){
	document.forms[0].terms.select()
}