							
/*** 
This is the menu creation code - place it right after you body tag
Feel free to add this to a stand-alone js file and link it to your page.
**/

if (document.images) {

newsletterOn = new Image();
newsletterOn.src = "images/newsletter_mouse.gif";
newsletterOff = new Image();
newsletterOff.src = "images/newsletter.gif";
}

function activate(image_name) {
if (document.images) {
document[image_name].src = eval(image_name + "On.src");
}
}
function deactivate(image_name) {
if (document.images) {
document[image_name].src = eval(image_name + "Off.src");
}
}



//Extra code to find position:
function findPos(){
  if(bw.ns4){   //Netscape 4
    x = document.layers.layerMenu1.pageX
    y = document.layers.layerMenu1.pageY
  }else{ //other browsers
    x=0; y=0; var el,temp
    el = bw.ie4?document.all["divMenu1"]:document.getElementById("divMenu1");
    if(el.offsetParent){
      temp = el
      while(temp.offsetParent){ //Looping parent elements to get the offset of them as well
        temp=temp.offsetParent; 
        x+=temp.offsetLeft
        y+=temp.offsetTop;
      }
    }
    x+=el.offsetLeft
    y+=el.offsetTop
  }
  //Returning the x and y as an array
  return [x,y]
}

pos = findPos()

//Menu object creation
oCMenu1=new makeCM("oCMenu1") //Making the menu object. Argument: menuname

//Menu properties   
oCMenu1.pxBetween=0
//Using the cm_page object to place the menu ----
oCMenu1.fromLeft=pos[0]
oCMenu1.fromTop=pos[1]
//We also need to "re place" the menu on resize. So:
oCMenu1.onresize="pos = findPos(); oCMenu1.fromLeft=pos[0]; oCMenu1.fromTop=pos[1]"

oCMenu1.rows=1
oCMenu1.menuPlacement=0
       

                                                             
oCMenu1.offlineRoot="" 
oCMenu1.onlineRoot="" 
oCMenu1.resizeCheck=1 
oCMenu1.wait=1000 
oCMenu1.fillImg="cm_fill.gif"
oCMenu1.zIndex=0

//Background bar properties
oCMenu1.useBar=1
oCMenu1.barWidth="menu"
oCMenu1.barHeight="menu" 
oCMenu1.barClass="clBar"
oCMenu1.barX="menu"
oCMenu1.barY="menu"
oCMenu1.barBorderX=0
oCMenu1.barBorderY=0
oCMenu1.barBorderClass=""



//Level properties - ALL properties have to be spesified in level 0
oCMenu1.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu1.level[0].width=105
oCMenu1.level[0].height=39
oCMenu1.level[0].regClass="clLevel0"
oCMenu1.level[0].overClass="clLevel0over"
oCMenu1.level[0].borderX=0
oCMenu1.level[0].borderY=0
oCMenu1.level[0].borderClass="clLevel0border"
oCMenu1.level[0].offsetX=8
oCMenu1.level[0].offsetY=43
oCMenu1.level[0].rows=0
oCMenu1.level[0].arrow=0
oCMenu1.level[0].arrowWidth=0
oCMenu1.level[0].arrowHeight=0
oCMenu1.level[0].align="center"


//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu1.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu1.level[1].width=oCMenu1.level[0].width-0
oCMenu1.level[1].height=19
oCMenu1.level[1].regClass="clLevel1_top"
oCMenu1.level[1].overClass="clLevel1over_top"
oCMenu1.level[1].borderX=1
oCMenu1.level[1].borderY=1
oCMenu1.level[1].align="right" 
oCMenu1.level[1].offsetX=25  //+(oCMenu1.level[0].width-2)/2+0
oCMenu1.level[1].offsetY=25
oCMenu1.level[1].borderClass="clLevel1border_top"



/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oCMenu1.makeMenu('top1','','','index.asp','','52','38','images/home.png','images/home_mouse.png')
		
		
oCMenu1.makeMenu('top2','','','about.asp','','82','38','images/about.png','images/about_mouse.png')
		oCMenu1.makeMenu('sub21','top2','Our Staff','staff.asp')
		oCMenu1.makeMenu('sub22','top2','Our Facility','facility.asp')
		oCMenu1.makeMenu('sub23','top2','Guest Presenters','guest_presenters.asp')
	
oCMenu1.makeMenu('top3','','','http://ak9slife.blogspot.com/','','50','38','images/blog.png','images/blog_mouse.png')
	
oCMenu1.makeMenu('top4','','','photos.asp?id=1','','68','38','images/photos.png','images/photos_mouse.png')

oCMenu1.makeMenu('top5','','','','','112','38','images/news.png','images/news_mouse.png')
		oCMenu1.makeMenu('sub51','top5','K9 Campus News','news.asp')
		oCMenu1.makeMenu('sub52','top5','K9 Campus Events','events.asp')
	
oCMenu1.makeMenu('top6','','','map_directions.asp','','134','38','images/map.png','images/map_mouse.png')

oCMenu1.makeMenu('top7','','','contact.asp','','94','38','images/contact.png','images/contact_mouse.png')	
		
		
//Leave this line - it constructs the menu
oCMenu1.construct()		

