//---- prevent getting "framed" ----
//if (top != self){
// top.location = location
//}
//---- name of current file ---------
var fileName = location.pathname.substring(location.pathname.lastIndexOf('/')+1);
//var siteHome = location.host + "/" + fileName;
//========= Output heading ============
document.write('<html><head><meta name="author" keyword="Jose Rivera, Michael Lam" />');
document.write('<link rel="stylesheet" type="text/css" href="default.css"></head><body>');
document.write('<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr>');
document.write('<th width="170" class="siteHead"><a href="home.htm">');
document.write('<img border="0" src="images/artcLogo.jpg" /></a><img src="images/headRound.gif" /></th>');
document.write('<th class="siteHead"><font face="Times New Roman, Times" size="3" color="ghostwhite">');
document.write('Addiction Research and Treatment Corporation</font><br/>');
document.write('<font style="font-weight: normal;">22 Chapel Street &middot; Brooklyn, NY 11201<br/>');
document.write('(718) 260-2900</font></th></tr></table>');

//--------- top category links --------
if (fileName != "home.htm") {
 generateTopMenu();
}

function generateTopMenu(){
//requires menuLink function, located in header.js
 var menuContent = new Array(2);
  menuContent[0] = new menuLink("treatment.htm","Treatment");
  menuContent[1] = new menuLink("medical.htm","Medical Services");
  menuContent[2] = new menuLink("research.htm","Research");
  menuContent[3] = new menuLink("voc.htm","Vocational");
  menuContent[4] = new menuLink("training.htm","Training");
  menuContent[5] = new menuLink("about.htm","About ARTC");
  menuContent[6] = new menuLink("contact.htm","Contact Us");
//----------------------------------------------------------------------------------------
 document.write('<table width="100%" cellspacing="0" cellpadding="0" style="border 1px solid #A080A0;"><tr>');
 for (i=0; i < menuContent.length; i++){
    document.write('<td class="hLinks" style="width: 120;" onClick="location.href=(\''+menuContent[i].target+'\');" onMouseOver="this.className=\'hOver\'" onMouseOut="this.className=\'hLinks\'">'+menuContent[i].title+'</td>');
 }
 document.write('<td class="hLinks">&nbsp;</td>'); //spacer
 document.write('</tr></table>');
}

function menuLink(target,title){ //for use with menus
 this.target = target;
 this.title = title;
}
