var pnumtsmdelay = 15000; 
var tsmslidenum = 0;
var tsmtimerID = 0;

function showTestimonials() {
tsmslidenum++;
if (tsmslidenum < tsmslidecount+1) {
   window.testimonial.location.href = pstrpage[tsmslidenum-1];
}
if (tsmslidenum == tsmslidecount+1) { // if finished
tsmslidenum = 0;
tsmtimerID = setTimeout('showTestimonials()', pnumtsmdelay)
}
else tsmtimerID = setTimeout('showTestimonials()', pnumtsmdelay);
}



var pnumtxtdelay = 4000; 
var txtkeywordnum = 0;
var txttimerID = 0;

function showKeywords() {
txtkeywordnum++;
if (txtkeywordnum < txtkeywordcount+1) {
    if (document.all) {
      document.all.keywordtext.innerText = pstrtext[txtkeywordnum-1];}
    else if (document.getElementById) {
      document.getElementById('keywordtext').innerHTML = pstrtext[txtkeywordnum-1];}
}
if (txtkeywordnum == txtkeywordcount+1) { // if finished
txtkeywordnum = 0;
txttimerID = setTimeout('showKeywords()', pnumtxtdelay)
}
else txttimerID = setTimeout('showKeywords()', pnumtxtdelay);
}


//
// Open a new window for the equal opportunity & privacy statements
//

function openpopup(pstrpage) {
var pstrURL, pinttop, pintleft;
pstrURL="apm_"+pstrpage+".htm";
pinttop = (screen.availHeight/2-170);
pintleft = (screen.availWidth/2-270);
if (navigator.appName == 'Microsoft Internet Explorer') 
	{window.open(pstrURL,pstrpage, "directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, height=340, width=540,top="+pinttop+",left="+pintleft);}
else
	{popupwindow=window.open(pstrURL,pstrpage,'resizable,scrollbars,height=340,width=540');}
}

//
// End of new window
//


//
// Open a new window for the map
//

function openmap() {
var pstrURL, pinttop, pintleft;
pstrURL="apm_nationwide.htm";
pinttop = (screen.availHeight/2-250);
pintleft = (screen.availWidth/2-345);
if (navigator.appName == 'Microsoft Internet Explorer') 
	{window.open(pstrURL,'map', "directories=no, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no, height=500, width=690,top="+pinttop+",left="+pintleft);}
else
	{popupwindow=window.open(pstrURL,'map','resizable,scrollbars,height=500,width=690');}
}

//
// End of new window
//

