/*** SET BUTTON'S FOLDER HERE ***/
var buttonFolder_menu1 = "/images/buttons/";

/*** SET BUTTONS' FILENAMES HERE ***/
upSources_menu1 = new Array("button1up_menu1.png","button2up_menu1.png","button3up_menu1.png","button4up_menu1.png","button5up_menu1.png","button6up_menu1.png","button7up_menu1.png","button8up_menu1.png","button9up_menu1.png","button10up_menu1.png","button11up_menu1.png","button12up_menu1.png","button13up_menu1.png");

overSources_menu1 = new Array("button1over_menu1.png","button2over_menu1.png","button3over_menu1.png","button4over_menu1.png","button5over_menu1.png","button6over_menu1.png","button7over_menu1.png","button8over_menu1.png","button9over_menu1.png","button10over_menu1.png","button11over_menu1.png","button12over_menu1.png","button13over_menu1.png");

// SUB MENUS DECLARATION, YOU DONT NEED TO EDIT THIS
subInfo_menu1 = new Array();
subInfo_menu1[1] = new Array();
subInfo_menu1[2] = new Array();
subInfo_menu1[3] = new Array();
subInfo_menu1[4] = new Array();
subInfo_menu1[5] = new Array();
subInfo_menu1[6] = new Array();
subInfo_menu1[7] = new Array();
subInfo_menu1[8] = new Array();
subInfo_menu1[9] = new Array();
subInfo_menu1[10] = new Array();
subInfo_menu1[11] = new Array();
subInfo_menu1[12] = new Array();
subInfo_menu1[13] = new Array();

//*** SET SUB MENUS TEXT LINKS AND TARGETS HERE ***//

subInfo_menu1[2][1] = new Array("What's Coming Soon","/products/","");
//subInfo_menu1[2][2] = new Array("Address Attendant","http://www.addressattendant.com","");
//subInfo_menu1[2][3] = new Array("Automailer Pro","/products/automailerpro.wsln","");
subInfo_menu1[2][2] = new Array("Call Center Stats","/products/ccs.wsln","");
//subInfo_menu1[2][5] = new Array("Customer Services Manager (CMS)","/products/cms.wsln","");
//subInfo_menu1[2][6] = new Array("Employee Vacation Calendar (jCal)","/products/jcal.wsln","");
subInfo_menu1[2][3] = new Array("Firearm Collection Keeper","http://www.firearmscollectionkeeper.com","");
subInfo_menu1[2][4] = new Array("NRA Training/Memberships","/nra/","");
//subInfo_menu1[2][8] = new Array("Inventory Control Systems (ICS)","/products/ics.wsln","");
//subInfo_menu1[2][9] = new Array("IP Changer","/products/ipchanger.wsln","");
//subInfo_menu1[2][10] = new Array("Lease/Contract Tracker","/products/lease.wsln","");
subInfo_menu1[2][5] = new Array("Password Generator","/products/password.wsln","");
//subInfo_menu1[2][12] = new Array("Speaker Box Calculator","/products/speaker.wsln","");
//subInfo_menu1[2][13] = new Array("Utilization Calculator","/products/utilization.wsln","");
subInfo_menu1[2][6] = new Array("wQA","/products/wQA.wsln","");


//subInfo_menu1[3][1] = new Array("Drivers","/Downloads/drivers.wsln","");
subInfo_menu1[3][1] = new Array("Documentation","/HelpFiles/docs.wsln","");
subInfo_menu1[3][2] = new Array("Freeware","/Downloads/freeware.wsln","");
//subInfo_menu1[3][4] = new Array("Updates","/Downloads/updates.wsln","");

subInfo_menu1[4][1] = new Array("Custom Software Development","/services/customsoftware.wsln","");
subInfo_menu1[4][2] = new Array("Consulting","/services/consulting.wsln","");
subInfo_menu1[4][3] = new Array("NRA Training/Memberships","/nra/","");
subInfo_menu1[4][4] = new Array("Software Maintenance","/services/softmaint.wsln","");
subInfo_menu1[4][5] = new Array("SQL Design/Maintenance/Hosting","/services/sql.wsln","");
subInfo_menu1[4][6] = new Array("Training","/services/training.wsln","");
subInfo_menu1[4][7] = new Array("Website Design/Maintenance/Hosting","/services/website.wsln","");

subInfo_menu1[6][1] = new Array("General Support","/forums","");
subInfo_menu1[6][2] = new Array("Report a Bug","/forums","");
subInfo_menu1[6][3] = new Array("Submit a Feature Request","/forums","");
//subInfo_menu1[6][4] = new Array("FAQ's","/Support/faq.wsln","");

subInfo_menu1[7][1] = new Array("WebMail Login","http://webmail.windedsolutions.com","");
subInfo_menu1[7][2] = new Array("Webmail Administration","http://iadmin.windedsolutions.com","");
subInfo_menu1[7][3] = new Array("Web FTP","http://wftp.windedsolutions.com","");

//subInfo_menu1[13][1] = new Array("FAQ's","/Support/faq.wsln","");



//*** SET SUB MENU POSITION ( RELATIVE TO BUTTON ) ***//
var xSubOffset_menu1 = 5;
var ySubOffset_menu1 = 21;



//*** NO MORE SETTINGS BEYOND THIS POINT ***//
var overSub_menu1 = false;
var delay_menu1 = 1000;
totalButtons_menu1 = upSources_menu1.length;

// GENERATE SUB MENUS
for ( x=0; x<totalButtons_menu1; x++) {
	// SET EMPTY DIV FOR BUTTONS WITHOUT SUBMENU
	if ( subInfo_menu1[x+1].length < 1 ) { 
		document.write('<div id="submenu' + (x+1) + '_menu1">');
	// SET DIV FOR BUTTONS WITH SUBMENU
	} else {
		document.write('<div id="submenu' + (x+1) + '_menu1" class="dropmenu_menu1" ');
		document.write('onMouseOver="overSub_menu1=true;');
		document.write('setOverImg_menu1(\'' + (x+1) + '\',\'_menu1\');"');
		document.write('onMouseOut="overSub_menu1=false;');
		document.write('setTimeout(\'hideSubMenu_menu1(\\\'submenu' + (x+1) + '_menu1\\\')\',delay_menu1);');
		document.write('setOutImg_menu1(\'' + (x+1) + '\',\'_menu1\');">');


		document.write('<ul>');
		for ( k=0; k<subInfo_menu1[x+1].length-1; k++ ) {
			document.write('<li>');
			document.write('<a href="' + subInfo_menu1[x+1][k+1][1] + '" ');
			document.write('target="' + subInfo_menu1[x+1][k+1][2] + '">');
			document.write( subInfo_menu1[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_menu1() {
	for ( x=0; x<totalButtons_menu1; x++ ) {
		buttonUp_menu1 = new Image();
		buttonUp_menu1.src = buttonFolder_menu1 + upSources_menu1[x];
		buttonOver_menu1 = new Image();
		buttonOver_menu1.src = buttonFolder_menu1 + overSources_menu1[x];
	}
}

// SET MOUSEOVER BUTTON
function setOverImg_menu1(But, ID) {
	document.getElementById('button' + But + ID).src = buttonFolder_menu1 + overSources_menu1[But-1];
}

// SET MOUSEOUT BUTTON
function setOutImg_menu1(But, ID) {
	document.getElementById('button' + But + ID).src = buttonFolder_menu1 + upSources_menu1[But-1];
}



//*** SUB MENU FUNCTIONS ***//
// GET ELEMENT ID MULTI BROWSER
function getElement_menu1(id) {
	return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null; 
}

// GET X COORDINATE
function getRealLeft_menu1(id) { 
	var el = getElement_menu1(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_menu1(id) {
	var el = getElement_menu1(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_menu1(objectID,x,y) {
	var el = getElement_menu1(objectID);
	el.style.left = x;
	el.style.top = y;
}

// MOVE SUBMENU TO CORRESPONDING BUTTON
function showSubMenu_menu1(subID, buttonID) {
	hideAllSubMenus_menu1();
	butX = getRealLeft_menu1(buttonID);
	butY = getRealTop_menu1(buttonID);
	moveObjectTo_menu1(subID,butX+xSubOffset_menu1, butY+ySubOffset_menu1);
}

// HIDE ALL SUB MENUS
function hideAllSubMenus_menu1() {
	for ( x=0; x<totalButtons_menu1; x++) {
		moveObjectTo_menu1("submenu" + (x+1) + "_menu1",-500, -500 );
	}
}

// HIDE ONE SUB MENU
function hideSubMenu_menu1(subID) {
	if ( overSub_menu1 == false ) {
		moveObjectTo_menu1(subID,-500, -500);
	}
}



//preload_menu1();


