/*** SET BUTTON'S FOLDER HERE ***/
var buttonFolder = "buttons/";

/*** SET BUTTONS' FILENAMES HERE ***/
upSources = new Array("button1up.png","button2up.png","button3up.png","button4up.png","button5up.png","button6up.png","button7up.png","button8up.png","button9up.png","button10up.png","button11up.png","button12up.png","button13up.png","button14up.png","button15up.png");

overSources = new Array("button1over.png","button2over.png","button3over.png","button4over.png","button5over.png","button6over.png","button7over.png","button8over.png","button9over.png","button10over.png","button11over.png","button12over.png","button13over.png","button14over.png","button15over.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();
subInfo[4] = new Array();
subInfo[5] = new Array();
subInfo[6] = new Array();
subInfo[7] = new Array();
subInfo[8] = new Array();
subInfo[9] = new Array();
subInfo[10] = new Array();
subInfo[11] = new Array();
subInfo[12] = new Array();
subInfo[13] = new Array();
subInfo[14] = new Array();
subInfo[15] = new Array();


//*** SET SUB MENUS TEXT LINKS AND TARGETS HERE ***//
subInfo[1][1] = new Array("January 2011","Dahmedjan.pdf","");
subInfo[1][2] = new Array("February 2011","Dahmedfeb.pdf","");
subInfo[1][3] = new Array("March 2011","Dahmedmar.pdf","");
subInfo[1][4] = new Array("April 2011","Dahmedapr.pdf","");
subInfo[1][5] = new Array("May 2011","Dahmedmay.pdf","");
subInfo[1][6] = new Array("June 2011","Dahmedjun.pdf","");
subInfo[1][7] = new Array("July 2011","Dahmedjul.pdf","");
subInfo[1][8] = new Array("August 2011","Dahmedaug.pdf","");
subInfo[1][9] = new Array("September 2011","Dahmedsep.pdf","");
subInfo[1][10] = new Array("October 2011","Dahmedoct.pdf","");
subInfo[1][11] = new Array("November 2011","Dahmednov.pdf","");
subInfo[1][12] = new Array("December 2011","Dahmeddec.pdf","");

subInfo[2][1] = new Array("January 2011","Dnagarjan.pdf","");
subInfo[2][2] = new Array("February 2011","Dnagarfeb.pdf","");
subInfo[2][3] = new Array("March 2011","Dnagarmar.pdf","");
subInfo[2][4] = new Array("April 2011","Dnagarapr.pdf","");
subInfo[2][5] = new Array("May 2011","Dnagarmay.pdf","");
subInfo[2][6] = new Array("June 2011","Dnagarjun.pdf","");
subInfo[2][7] = new Array("July 2011","Dnagarjul.pdf","");
subInfo[2][8] = new Array("August 2011","Dnagaraug.pdf","");
subInfo[2][9] = new Array("September 2011","Dnagarsep.pdf","");
subInfo[2][10] = new Array("October 2011","Dnagaroct.pdf","");
subInfo[2][11] = new Array("November 2011","Dnagarnov.pdf","");
subInfo[2][12] = new Array("December 2011","Dnagardec.pdf","");

subInfo[3][1] = new Array("January 2011","Dparnerjan.pdf","");
subInfo[3][2] = new Array("February 2011","Dparnerfeb.pdf","");
subInfo[3][3] = new Array("March 2011","Dparnermar.pdf","");
subInfo[3][4] = new Array("April 2011","Dparnerapr.pdf","");
subInfo[3][5] = new Array("May 2011","Dparnermay.pdf","");
subInfo[3][6] = new Array("June 2011","Dparnerjun.pdf","");
subInfo[3][7] = new Array("July 2011","Dparnerjul.pdf","");
subInfo[3][8] = new Array("August 2011","Dparneraug.pdf","");
subInfo[3][9] = new Array("September 2011","Dparnersep.pdf","");
subInfo[3][10] = new Array("October 2011","Dparneroct.pdf","");
subInfo[3][11] = new Array("November 2011","Dparnernov.pdf","");
subInfo[3][12] = new Array("December 2011","Dparnerdec.pdf","");

subInfo[4][1] = new Array("January 2011","Dpathardijan.pdf","");
subInfo[4][2] = new Array("February 2011","Dpathardifeb.pdf","");
subInfo[4][3] = new Array("March 2011","Dpathardimar.pdf","");
subInfo[4][4] = new Array("April 2011","Dpathardiapr.pdf","");
subInfo[4][5] = new Array("May 2011","Dpathardimay.pdf","");
subInfo[4][6] = new Array("June 2011","Dpathardijun.pdf","");
subInfo[4][7] = new Array("July 2011","Dpathardijul.pdf","");
subInfo[4][8] = new Array("August 2011","Dpathardiaug.pdf","");
subInfo[4][9] = new Array("September 2011","Dpathardisep.pdf","");
subInfo[4][10] = new Array("October 2011","Dpathardioct.pdf","");
subInfo[4][11] = new Array("November 2011","Dpathardinov.pdf","");
subInfo[4][12] = new Array("December 2011","Dpathardidec.pdf","");

subInfo[5][1] = new Array("January 2011","Dshevgaonjan.pdf","");
subInfo[5][2] = new Array("February 2011","Dshevgaonfeb.pdf","");
subInfo[5][3] = new Array("March 2011","Dshevgaonmar.pdf","");
subInfo[5][4] = new Array("April 2011","Dshevgaonapr.pdf","");
subInfo[5][5] = new Array("May 2011","Dshevgaonmay.pdf","");
subInfo[5][6] = new Array("June 2011","Dshevgaonjun.pdf","");
subInfo[5][7] = new Array("July 2011","Dshevgaonjul.pdf","");
subInfo[5][8] = new Array("August 2011","Dshevgaonaug.pdf","");
subInfo[5][9] = new Array("September 2011","Dshevgaonsep.pdf","");
subInfo[5][10] = new Array("October 2011","Dshevgaonoct.pdf","");
subInfo[5][11] = new Array("November 2011","Dshevgaonnov.pdf","");
subInfo[5][12] = new Array("December 2011","Dshevgaondec.pdf","");


subInfo[6][1] = new Array("January 2011","Dkarjatjan.pdf","");
subInfo[6][2] = new Array("February 2011","Dkarjatfeb.pdf","");
subInfo[6][3] = new Array("March 2011","Dkarjatmar.pdf","");
subInfo[6][4] = new Array("April 2011","Dkarjatapr.pdf","");
subInfo[6][5] = new Array("May 2011","Dkarjatmay.pdf","");
subInfo[6][6] = new Array("June 2011","Dkarjatjun.pdf","");
subInfo[6][7] = new Array("July 2011","Dkarjatjul.pdf","");
subInfo[6][8] = new Array("August 2011","Dkarjataug.pdf","");
subInfo[6][9] = new Array("September 2011","Dkarjatsep.pdf","");
subInfo[6][10] = new Array("October 2011","Dkarjatoct.pdf","");
subInfo[6][11] = new Array("November 2011","Dkarjatnov.pdf","");
subInfo[6][12] = new Array("December 2011","Dkarjatdec.pdf","");

subInfo[7][1] = new Array("January 2011","Dshrigondajan.pdf","");
subInfo[7][2] = new Array("February 2011","Dshrigondafeb.pdf","");
subInfo[7][3] = new Array("March 2011","Dshrigondamar.pdf","");
subInfo[7][4] = new Array("April 2011","Dshrigondaapr.pdf","");
subInfo[7][5] = new Array("May 2011","Dshrigondamay.pdf","");
subInfo[7][6] = new Array("June 2011","Dshrigondajun.pdf","");
subInfo[7][7] = new Array("July 2011","Dshrigondajul.pdf","");
subInfo[7][8] = new Array("August 2011","Dshrigondaaug.pdf","");
subInfo[7][9] = new Array("September 2011","Dshrigondasep.pdf","");
subInfo[7][10] = new Array("October 2011","Dshrigondaoct.pdf","");
subInfo[7][11] = new Array("November 2011","Dshrigondanov.pdf","");
subInfo[7][12] = new Array("December 2011","Dshrigondadec.pdf","");


subInfo[8][1] = new Array("January 2011","Djamkhedjan.pdf","");
subInfo[8][2] = new Array("February 2011","Djamkhedfeb.pdf","");
subInfo[8][3] = new Array("March 2011","Djamkhedmar.pdf","");
subInfo[8][4] = new Array("April 2011","Djamkhedapr.pdf","");
subInfo[8][5] = new Array("May 2011","Djamkhedmay.pdf","");
subInfo[8][6] = new Array("June 2011","Djamkhedjun.pdf","");
subInfo[8][7] = new Array("July 2011","Djamkhedjul.pdf","");
subInfo[8][8] = new Array("August 2011","Djamkhedaug.pdf","");
subInfo[8][9] = new Array("September 2011","Djamkhedsep.pdf","");
subInfo[8][10] = new Array("October 2011","Djamkhedoct.pdf","");
subInfo[8][11] = new Array("November 2011","Djamkhednov.pdf","");
subInfo[8][12] = new Array("December 2011","Djamkheddec.pdf","");

subInfo[9][1] = new Array("January 2011","Dshrirampurjan.pdf","");
subInfo[9][2] = new Array("February 2011","Dshrirampurfeb.pdf","");
subInfo[9][3] = new Array("March 2011","Dshrirampurmar.pdf","");
subInfo[9][4] = new Array("April 2011","Dshrirampurapr.pdf","");
subInfo[9][5] = new Array("May 2011","Dshrirampurmay.pdf","");
subInfo[9][6] = new Array("June 2011","Dshrirampurjun.pdf","");
subInfo[9][7] = new Array("July 2011","Dshrirampurjul.pdf","");
subInfo[9][8] = new Array("August 2011","Dshrirampuraug.pdf","");
subInfo[9][9] = new Array("September 2011","Dshrirampursep.pdf","");
subInfo[9][10] = new Array("October 2011","Dshrirampuroct.pdf","");
subInfo[9][11] = new Array("November 2011","Dshrirampurnov.pdf","");
subInfo[9][12] = new Array("December 2011","Dshrirampurdec.pdf","");

subInfo[10][1] = new Array("January 2011","Drahurijan.pdf","");
subInfo[10][2] = new Array("February 2011","Drahurifeb.pdf","");
subInfo[10][3] = new Array("March 2011","Drahurimar.pdf","");
subInfo[10][4] = new Array("April 2011","Drahuriapr.pdf","");
subInfo[10][5] = new Array("May 2011","Drahurimay.pdf","");
subInfo[10][6] = new Array("June 2011","Drahurijun.pdf","");
subInfo[10][7] = new Array("July 2011","Drahurijul.pdf","");
subInfo[10][8] = new Array("August 2011","Drahuriaug.pdf","");
subInfo[10][9] = new Array("September 2011","Drahurisep.pdf","");
subInfo[10][10] = new Array("October 2011","Drahurioct.pdf","");
subInfo[10][11] = new Array("November 2011","Drahurinov.pdf","");
subInfo[10][12] = new Array("December 2011","Drahuridec.pdf","");

subInfo[11][1] = new Array("January 2011","Drahatajan.pdf","");
subInfo[11][2] = new Array("February 2011","Drahatafeb.pdf","");
subInfo[11][3] = new Array("March 2011","Drahatamar.pdf","");
subInfo[11][4] = new Array("April 2011","Drahataapr.pdf","");
subInfo[11][5] = new Array("May 2011","Drahatamay.pdf","");
subInfo[11][6] = new Array("June 2011","Drahatajun.pdf","");
subInfo[11][7] = new Array("July 2011","Drahatajul.pdf","");
subInfo[11][8] = new Array("August 2011","Drahataaug.pdf","");
subInfo[11][9] = new Array("September 2011","Drahatasep.pdf","");
subInfo[11][10] = new Array("October 2011","Drahataoct.pdf","");
subInfo[11][11] = new Array("November 2011","Drahatanov.pdf","");
subInfo[11][12] = new Array("December 2011","Drahatadec.pdf","");

subInfo[12][1] = new Array("January 2011","Dnewasajan.pdf","");
subInfo[12][2] = new Array("February 2011","Dnewasafeb.pdf","");
subInfo[12][3] = new Array("March 2011","Dnewasamar.pdf","");
subInfo[12][4] = new Array("April 2011","Dnewasaapr.pdf","");
subInfo[12][5] = new Array("May 2011","Dnewasamay.pdf","");
subInfo[12][6] = new Array("June 2011","Dnewasajun.pdf","");
subInfo[12][7] = new Array("July 2011","Dnewasajul.pdf","");
subInfo[12][8] = new Array("August 2011","Dnewasaaug.pdf","");
subInfo[12][9] = new Array("September 2011","Dnewasasep.pdf","");
subInfo[12][10] = new Array("October 2011","Dnewasaoct.pdf","");
subInfo[12][11] = new Array("November 2011","Dnewasanov.pdf","");
subInfo[12][12] = new Array("December 2011","Dnewasadec.pdf","");

subInfo[13][1] = new Array("January 2011","Dsangamnerjan.pdf","");
subInfo[13][2] = new Array("February 2011","Dsangamnerfeb.pdf","");
subInfo[13][3] = new Array("March 2011","Dsangamnermar.pdf","");
subInfo[13][4] = new Array("April 2011","Dsangamnerapr.pdf","");
subInfo[13][5] = new Array("May 2011","Dsangamnermay.pdf","");
subInfo[13][6] = new Array("June 2011","Dsangamnerjun.pdf","");
subInfo[13][7] = new Array("July 2011","Dsangamnerjul.pdf","");
subInfo[13][8] = new Array("August 2011","Dsangamneraug.pdf","");
subInfo[13][9] = new Array("September 2011","Dsangamnersep.pdf","");
subInfo[13][10] = new Array("October 2011","Dsangamneroct.pdf","");
subInfo[13][11] = new Array("November 2011","Dsangamnernov.pdf","");
subInfo[13][12] = new Array("December 2011","Dsangamnerdec.pdf","");

subInfo[14][1] = new Array("January 2011","Dkopargaonjan.pdf","");
subInfo[14][2] = new Array("February 2011","Dkopargaonfeb.pdf","");
subInfo[14][3] = new Array("March 2011","Dkopargaonmar.pdf","");
subInfo[14][4] = new Array("April 2011","Dkopargaonapr.pdf","");
subInfo[14][5] = new Array("May 2011","Dkopargaonmay.pdf","");
subInfo[14][6] = new Array("June 2011","Dkopargaonjun.pdf","");
subInfo[14][7] = new Array("July 2011","Dkopargaonjul.pdf","");
subInfo[14][8] = new Array("August 2011","Dkopargaonaug.pdf","");
subInfo[14][9] = new Array("September 2011","Dkopargaonsep.pdf","");
subInfo[14][10] = new Array("October 2011","Dkopargaonoct.pdf","");
subInfo[14][11] = new Array("November 2011","Dkopargaonnov.pdf","");
subInfo[14][12] = new Array("December 2011","Dkopargaondec.pdf","");

subInfo[15][1] = new Array("January 2011","Dakolajan.pdf","");
subInfo[15][2] = new Array("February 2011","Dakolafeb.pdf","");
subInfo[15][3] = new Array("March 2011","Dakolamar.pdf","");
subInfo[15][4] = new Array("April 2011","Dakolaapr.pdf","");
subInfo[15][5] = new Array("May 2011","Dakolamay.pdf","");
subInfo[15][6] = new Array("June 2011","Dakolajun.pdf","");
subInfo[15][7] = new Array("July 2011","Dakolajul.pdf","");
subInfo[15][8] = new Array("August 2011","Dakolaaug.pdf","");
subInfo[15][9] = new Array("September 2011","Dakolasep.pdf","");
subInfo[15][10] = new Array("October 2011","Dakolaoct.pdf","");
subInfo[15][11] = new Array("November 2011","Dakolanov.pdf","");
subInfo[15][12] = new Array("December 2011","Dakoladec.pdf","");


//*** SET SUB MENU POSITION ( RELATIVE TO BUTTON ) ***//
var xSubOffset = 117;
var ySubOffset = 5;



//*** 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();


