// JavaScript Document
function news(){
var nav = document.getElementById("news");
var 	newlinks = '<a href="http://www.atwplc.co.uk/news/iris- aquisition.htm">IRIS Acquire ATW</a>';
newlinks += '<a href="http://www.atwplc.co.uk/news/credit-crunch-it-finance.htm">Credit crunch and the IT finance sector</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/iris-exchequer-award.htm">IRIS Exchequer wins another award</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/senior-software-sales-consultant.htm">Senior software sales consultant appointmnet</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/IRIS-Enterprise-Software.htm">IRIS Enterprise software No 1</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/strategic-appointments.htm">New Strategic Appointments for ATW</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/platinum-reseller-status.htm">ATW awarded Platinum Partner Accreditation</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/inland-revenue.htm">Rules for Inland Revenue on-line submission changes</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/iris-buys-exchequer.htm">IRIS buys Exchequer Software</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/news/hat-trick-honours.htm">Hat-trick honours for Exchequer from IRIS</a>';
	nav.innerHTML = newlinks;
}

function articles(){
var nav = document.getElementById("articles");
var newlinks = '<a href="http://www.atwplc.co.uk/articles/networking-for-small-business.htm">Networking for small businesses</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/articles/cordek.htm">Case Study: Cordek</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/articles/marshPlant.htm">Case Study: Marsh Plant</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/articles/tangmere.htm">Case Study: Tangmere</a>';
	newlinks += '<a href="http://www.atwplc.co.uk/articles/mad.htm">Case Study: MAD</a>';	
	nav.innerHTML = newlinks;
}

	var servicescontent=new Array()
servicescontent[1]='<a href="#" onClick="change(\'services\',\'rel\'); change(\'articles\', \'absolute\'); change(\'news\', \'absolute\');changeservicescontent(servicescontent[2]); changearticlescontent(articlescontent[1]); changenewscontent(newscontent[1])">Business Services</a>'
servicescontent[2]='<a href="#" onClick="change(\'services\',\'absolute\'); change(\'articles\', \'absolute\'); change(\'news\', \'absolute\');changeservicescontent(servicescontent[1]); changearticlescontent(articlescontent[1]); changenewscontent(newscontent[1])">Business Services</a>'
function changeservicescontent(whichcontent){
document.getElementById("serviceslinks").innerHTML =''+whichcontent+'';
}

var articlescontent=new Array()
articlescontent[1]='<a href="#" onClick="change(\'services\',\'absolute\'); change(\'articles\', \'rel\'); change(\'news\', \'absolute\'); changearticlescontent(articlescontent[2]); changeservicescontent(servicescontent[1]); changenewscontent(newscontent[1])">Articles &amp; Features</a>'
articlescontent[2]='<a href="#" onClick="change(\'services\',\'absolute\'); change(\'articles\', \'absolute\'); change(\'news\', \'absolute\'); changearticlescontent(articlescontent[1]); changeservicescontent(servicescontent[1]); changenewscontent(newscontent[1])">Articles &amp; Features</a>'
function changearticlescontent(whichcontent){
document.getElementById("articleslinks").innerHTML =''+whichcontent+'';
}

var newscontent=new Array()
newscontent[1]='<a href="#" onClick="change(\'services\',\'absolute\'); change(\'articles\', \'absolute\'); change(\'news\', \'rel\');changeservicescontent(servicescontent[1]); changearticlescontent(articlescontent[1]); changenewscontent(newscontent[2])">News</a>'
newscontent[2]='<a href="#" onClick="change(\'services\',\'absolute\'); change(\'articles\', \'absolute\'); change(\'news\', \'absolute\');changeservicescontent(servicescontent[1]); changearticlescontent(articlescontent[1]); changenewscontent(newscontent[1])">News</a>'
function changenewscontent(whichcontent){
document.getElementById("newslinks").innerHTML =''+whichcontent+'';
}

var downladscontent=new Array()
downladscontent[1]='Downloads:<br>&nbsp;<a href="/downloads/exchequerBrouchre.pdf" target="_blank">Exchequer Brochure</a>&nbsp;<a href="http://www.atw-web-marketing.co.uk/pdf/SuccessOnTheNet.pdf" target="_blank">The Key to Success</a>'


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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function change(id, newClass) {

identity=document.getElementById(id);

identity.className=newClass;

}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function doDelay() {
delay = 1;    // time in seconds before popup opens
timer = setTimeout("MM_showHideLayers('flash','','show')", delay*1000);
}
function TheFormCheck() {
if (document.form.email.value=="") 
{
alert("email is required");
document.form.email.focus();return false
}

if (document.form.email.value!="") 
{if (document.form.email.value.indexOf("@")==-1 || document.form.email.value.indexOf(".")==-1 || document.form.email.value.indexOf(" ")!=-1 || document.form.email.value.length<6) 
{alert("Sorry, your email address is not valid.");
document.form.email.focus();return false}
}
} 
function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}