﻿// functions used in sigma chi website
// developed by: Yoav Schwartz
// extension of function in the 'X' library

<!-- Begin

// first check if NN4 - if so - redirect
 if (xNN4)
 document.location.href="error_NN4.html";
// end check - proceed

// create arrow_down image
	arrow_down = new Image();
	arrow_down.src= "images/arrow_down.gif";

function onMouse(button){
	button.className="side_button_over"
	}
function offMouse(button){
	button.className="side_button"

	}
function onDown(page){
	document.location.href=page;
	}
function onDown2(page){
	window.open(page, "_blank");
	}

function hideMenu(){

	xTop('group_group', -49)
	xTop('show_button', 20)
	xTop('hide_button', -15)
	xTop('content', 31)
	
	xTop('side_bar', 31)
	xTop('hide_bar', 31)
	xTop('show_bar', 31)
	
	xTop('footer', xTop('footer')-49)
	}
function showMenu(){
	xSlideTo('group_group', 0,0,700)
	xTop('show_button', -15)
	xTop('hide_button', 71)
	xTop('content', 80)
	
	xTop('side_bar', 80)
	xTop('hide_bar', 80)
	xTop('show_bar', 80)
	xTop('footer', xTop('footer')+49)
	}

function hideBar(){

	xLeft('side_bar', -150)
	xLeft('hide_bar', -15)
	xLeft('show_bar', 1)
	
	xLeft('content', 12)
	xWidth('content', 749)
	xWidth('content_box', 709)
	
	}

function showBar(){

	xLeft('side_bar', 0)
	//xSlideTo('side_bar',0, xTop('side_bar'),600)
	xLeft('hide_bar', 149)
	xLeft('show_bar', -15)
	
	xLeft('content', 160)
	xWidth('content', 601)
	xWidth('content_box', 561)
	
	}
	
function setStandardHeight(){



// set the size of content based on size of content_box

xHeight('content', xHeight('content_box')+32)

// get the natural heights of the menu, content
// figure out the heighest, set that as the height for 
// menu, content, menu_show and menu_hide
// also, set the top position for the footer

var maxHeight = Math.max(xHeight('content'), xHeight('side_bar'))

xHeight('content', maxHeight)
xHeight('side_bar', maxHeight)
xHeight('show_bar', maxHeight)
xHeight('hide_bar', maxHeight)

xTop('footer', xHeight('content')+73)
xShow('footer')
}



function event_show(cur_event, num){
		
			var inner_height = xHeight('inner_'+num);
			xHeight(cur_event, inner_height);
			xShow(cur_event);
			setStandardHeight();
			return;
		}
		
function event_hide(cur_event, arrow){
		
			xHeight(cur_event, 1);
			xHide(cur_event);
			setStandardHeight();
			return;
		}
