/*** SET BUTTON'S FOLDER HERE ***/var buttonFolder_ = "buttons/";/*** SET BUTTONS' FILENAMES HERE ***/upSources_ = new Array("button1up_.png","button2up_.png","button3up_.png");overSources_ = new Array("button1over_.png","button2over_.png","button3over_.png");// SUB MENUS DECLARATION, YOU DONT NEED TO EDIT THISsubInfo_ = new Array();subInfo_[1] = new Array();subInfo_[2] = new Array();subInfo_[3] = new Array();//*** SET SUB MENUS TEXT LINKS AND TARGETS HERE ***//subInfo_[1][1] = new Array("Amusement Parks","http://www.srcphotography.com/gallery/index.php?cat=4","");subInfo_[1][2] = new Array("Family","http://www.srcphotography.com/gallery/index.php?cat=17","");subInfo_[1][3] = new Array("Work","http://www.srcphotography.com/gallery/index.php?cat=19","");//*** SET SUB MENU POSITION ( RELATIVE TO BUTTON ) ***//var xSubOffset_ = 12;var ySubOffset_ = 47;//*** NO MORE SETTINGS BEYOND THIS POINT ***//var overSub_ = false;var delay_ = 1000;totalButtons_ = upSources_.length;// GENERATE SUB MENUSfor ( x=0; x<totalButtons_; x++) {	// SET EMPTY DIV FOR BUTTONS WITHOUT SUBMENU	if ( subInfo_[x+1].length < 1 ) { 		document.write('<div id="submenu' + (x+1) + '_">');	// SET DIV FOR BUTTONS WITH SUBMENU	} else {		document.write('<div id="submenu' + (x+1) + '_" class="dropmenu_" ');		document.write('onMouseOver="overSub_=true;');		document.write('setOverImg_(\'' + (x+1) + '\',\'_\');"');		document.write('onMouseOut="overSub_=false;');		document.write('setTimeout(\'hideSubMenu_(\\\'submenu' + (x+1) + '_\\\')\',delay_);');		document.write('setOutImg_(\'' + (x+1) + '\',\'_\');">');		document.write('<ul>');		for ( k=0; k<subInfo_[x+1].length-1; k++ ) {			document.write('<li>');			document.write('<a href="' + subInfo_[x+1][k+1][1] + '" ');			document.write('target="' + subInfo_[x+1][k+1][2] + '">');			document.write( subInfo_[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_() {	for ( x=0; x<totalButtons_; x++ ) {		buttonUp_ = new Image();		buttonUp_.src = buttonFolder_ + upSources_[x];		buttonOver_ = new Image();		buttonOver_.src = buttonFolder_ + overSources_[x];	}}// SET MOUSEOVER BUTTONfunction setOverImg_(But, ID) {	document.getElementById('button' + But + ID).src = buttonFolder_ + overSources_[But-1];}// SET MOUSEOUT BUTTONfunction setOutImg_(But, ID) {	document.getElementById('button' + But + ID).src = buttonFolder_ + upSources_[But-1];}//*** SUB MENU FUNCTIONS ***//// GET ELEMENT ID MULTI BROWSERfunction getElement_(id) {	return document.getElementById ? document.getElementById(id) : document.all ? document.all(id) : null; }// GET X COORDINATEfunction getRealLeft_(id) { 	var el = getElement_(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_(id) {	var el = getElement_(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_(objectID,x,y) {	var el = getElement_(objectID);	el.style.left = x;	el.style.top = y;}// MOVE SUBMENU TO CORRESPONDING BUTTONfunction showSubMenu_(subID, buttonID) {	hideAllSubMenus_();	butX = getRealLeft_(buttonID);	butY = getRealTop_(buttonID);	moveObjectTo_(subID,butX+xSubOffset_, butY+ySubOffset_);}// HIDE ALL SUB MENUSfunction hideAllSubMenus_() {	for ( x=0; x<totalButtons_; x++) {		moveObjectTo_("submenu" + (x+1) + "_",-500, -500 );	}}// HIDE ONE SUB MENUfunction hideSubMenu_(subID) {	if ( overSub_ == false ) {		moveObjectTo_(subID,-500, -500);	}}//preload_();