/*** SET BUTTON'S FOLDER HERE ***/
var buttonFolder_aug = "buttons/";

/*** SET BUTTONS' FILENAMES HERE ***/
upSources_aug = new Array("button1up_aug.png","button2up_aug.png");

overSources_aug = new Array("button1over_aug.png","button2over_aug.png");

// SUB MENUS DECLARATION, YOU DONT NEED TO EDIT THIS
subInfo_aug = new Array();
subInfo_aug[1] = new Array();
subInfo_aug[2] = new Array();


//*** SET SUB MENUS TEXT LINKS AND TARGETS HERE ***//
subInfo_aug[1][1] = new Array("Coming Soon","Coming Soon","");



//*** SET SUB MENU POSITION ( RELATIVE TO BUTTON ) ***//
var xSubOffset_aug = 117;
var ySubOffset_aug = 5;



//*** NO MORE SETTINGS BEYOND THIS POINT ***//
var overSub_aug = false;
var delay_aug = 1000;
totalButtons_aug = upSources_aug.length;

// GENERATE SUB MENUS
for ( x=0; x<totalButtons_aug; x++) {
	// SET EMPTY DIV FOR BUTTONS WITHOUT SUBMENU
	if ( subInfo_aug[x+1].length < 1 ) { 
		document.write('<div id="submenu' + (x+1) + '_aug">');
	// SET DIV FOR BUTTONS WITH SUBMENU
	} else {
		document.write('<div id="submenu' + (x+1) + '_aug" class="dropmenu_aug" ');
		document.write('onMouseOver="overSub_aug=true;');
		document.write('setOverImg_aug(\'' + (x+1) + '\',\'_aug\');"');
		document.write('onMouseOut="overSub_aug=false;');
		document.write('setTimeout(\'hideSubMenu_aug(\\\'submenu' + (x+1) + '_aug\\\')\',delay_aug);');
		document.write('setOutImg_aug(\'' + (x+1) + '\',\'_aug\');">');


		document.write('<ul>');
		for ( k=0; k<subInfo_aug[x+1].length-1; k++ ) {
			document.write('<li>');
			document.write('<a href="' + subInfo_aug[x+1][k+1][1] + '" ');
			document.write('target="' + subInfo_aug[x+1][k+1][2] + '">');
			document.write( subInfo_aug[x+1][k+1][0] + '</a>');
			document.write('</li>');
		}
		document.write('</ul>');
	}
	document.write('</div>');
}





//*** MAIN BUTTONS FUNCTIONS ***//
// PRELOAD MAIN MENU BUTTON IMAGES
function preload_aug() {
	for ( x=0; x<totalButtons_aug; x++ ) {
		buttonUp_aug = new Image();
		buttonUp_aug.src = buttonFolder_aug + upSources_aug[x];
		buttonOver_aug = new Image();
		buttonOver_aug.src = buttonFolder_aug + overSources_aug[x];
	}
}

// SET MOUSEOVER BUTTON
function setOverImg_aug(But, ID) {
	document.getElementById('button' + But + ID).src = buttonFolder_aug + overSources_aug[But-1];
}

// SET MOUSEOUT BUTTON
function setOutImg_aug(But, ID) {
	document.getElementById('button' + But + ID).src = buttonFolder_aug + upSources_aug[But-1];
}



//*** SUB MENU FUNCTIONS ***//
// GET ELEMENT ID MULTI BROWSER
function getElement_aug(id) {
	return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null; 
}

// GET X COORDINATE
function getRealLeft_aug(id) { 
	var el = getElement_aug(id);
	if (el) { 
		xPos = el.offsetLeft;
		tempEl = el.offsetParent;
		while (tempEl != null) {
			xPos += tempEl.offsetLeft;
			tempEl = tempEl.offsetParent;
		} 
		return xPos;
	} 
} 

// GET Y COORDINATE
function getRealTop_aug(id) {
	var el = getElement_aug(id);
	if (el) { 
		yPos = el.offsetTop;
		tempEl = el.offsetParent;
		while (tempEl != null) {
			yPos += tempEl.offsetTop;
			tempEl = tempEl.offsetParent;
		}
		return yPos;
	}
}

// MOVE OBJECT TO COORDINATE
function moveObjectTo_aug(objectID,x,y) {
	var el = getElement_aug(objectID);
	el.style.left = x;
	el.style.top = y;
}

// MOVE SUBMENU TO CORRESPONDING BUTTON
function showSubMenu_aug(subID, buttonID) {
	hideAllSubMenus_aug();
	butX = getRealLeft_aug(buttonID);
	butY = getRealTop_aug(buttonID);
	moveObjectTo_aug(subID,butX+xSubOffset_aug, butY+ySubOffset_aug);
}

// HIDE ALL SUB MENUS
function hideAllSubMenus_aug() {
	for ( x=0; x<totalButtons_aug; x++) {
		moveObjectTo_aug("submenu" + (x+1) + "_aug",-500, -500 );
	}
}

// HIDE ONE SUB MENU
function hideSubMenu_aug(subID) {
	if ( overSub_aug == false ) {
		moveObjectTo_aug(subID,-500, -500);
	}
}



//preload_aug();


