	var fnd_arr = new Array(50);
	var fam_arr = new Array(50);
	
	for (cnt = 0; cnt < fnd_arr.length; cnt ++){	//create 2d of the array
		fnd_arr[cnt] = new Array(2);
		fam_arr[cnt] = new Array(2);
	}
	
	fam_arr[0][0] = "f_image_01.jpg";
	fam_arr[0][1] = "The Kotys family at Irene and Steve Tymikiw's wedding, June 12, 1993";
	fam_arr[1][0] = "f_image_02.jpg";
	fam_arr[1][1] = "Steve and Wasyl hanging out at the Chomiszak house";
	fam_arr[2][0] = "f_image_03.jpg";
	fam_arr[2][1] = "Enjoying some laughs";
	fam_arr[3][0] = "f_image_04.jpg";
	fam_arr[3][1] = "Father and daughter's precious moment down the aisle";
	fam_arr[4][0] = "f_image_05.jpg";
	fam_arr[4][1] = "Elated parents with the newlyweds";
	fam_arr[5][0] = "f_image_06.jpg";
	fam_arr[5][1] = "Proud parents of the bride and groom";
	fam_arr[6][0] = "f_image_07.jpg";
	fam_arr[6][1] = "Father and daughter celebrating their first dance";
	fam_arr[7][0] = "f_image_08.jpg";
	fam_arr[7][1] = "Foxy couple celebrating at a New Year's Eve party";
	fam_arr[8][0] = "f_image_09.jpg";
	fam_arr[8][1] = "Childhood friends await cocktail hour at Ola and Steve's reception";
	fam_arr[9][0] = "f_image_10.jpg";
	fam_arr[9][1] = "Celebrating life and happiness in Kauai's sweet breezes";
	fam_arr[10][0] = "f_image_11.jpg";
	fam_arr[10][1] = "Isabella, Babci and Didi enjoying the sun";
	fam_arr[11][0] = "f_image_12.jpg";
	fam_arr[11][1] = "Taking in Hawaii's gorgeous views";
	fam_arr[12][0] = "f_image_13.jpg";
	fam_arr[12][1] = "Wasyl shines as he walks Ola at her wedding";
	fam_arr[13][0] = "f_image_14.jpg";
	fam_arr[13][1] = "Wasyl and Mila relaxing at Spring Lake, NJ";
	fam_arr[14][0] = "f_image_15.jpg";
	fam_arr[14][1] = "Sailing away in Hawaii";
	fam_arr[15][0] = "f_image_16.jpg";
	fam_arr[15][1] = "Proud parents await the wedding ceremony of their daughter, Ola, in Kauai, Hawaii";
	fam_arr[16][0] = "f_image_17.jpg";
	fam_arr[16][1] = "Isabella chilling with Didi";
	fam_arr[17][0] = "f_image_18.jpg";
	fam_arr[17][1] = "Sweet kisses on the way to Marmora, Canada";
	fam_arr[18][0] = "f_image_19.jpg";
	fam_arr[18][1] = "Sweet moment as Wasyl walks Ola down the aisle";
	fam_arr[19][0] = "f_image_20.jpg";
	fam_arr[19][1] = "Wasyl and Ola's great smiles at Point Pleasant, NJ";
	fam_arr[20][0] = "f_image_21.jpg";
	fam_arr[20][1] = "Helen and Wasyl coming home from church";
	fam_arr[21][0] = "f_image_22.jpg";
	fam_arr[21][1] = "Isabella comforting Didi on the couch";
	fam_arr[22][0] = "f_image_23.jpg";
	fam_arr[22][1] = "The Kotys family enjoying a lovely day at the beach";
	fam_arr[23][0] = "f_image_24.jpg";
	fam_arr[23][1] = "Wasyl, Helen and Piotr preparing to leave the beach";
	fam_arr[24][0] = "f_image_25.jpg";
	fam_arr[24][1] = "The Kotys beach bums waiting for the sunset";
	fam_arr[25][0] = "f_image_26.jpg";
	fam_arr[25][1] = "Proud parents enjoying the moment at their daughter's wedding";
	fam_arr[26][0] = "f_image_27.jpg";
	fam_arr[26][1] = "The Chomiszak and Kotys families at Ola and Steve's wedding";
	fam_arr[27][0] = "f_image_28.jpg";
	fam_arr[27][1] = "Easter celebration at the Kudrik home";
	fam_arr[28][0] = "f_image_29.jpg";
	fam_arr[28][1] = "You lookin' at me?";
	fam_arr[29][0] = "f_image_30.jpg";
	fam_arr[29][1] = "Picnicking at the Kotys home";
	fam_arr[30][0] = "f_image_31.jpg";
	fam_arr[30][1] = "Wasyl, Maria and Tyler enjoying family time";
	fam_arr[31][0] = "f_image_32.jpg";
	fam_arr[31][1] = "Steve Sr., Steve Jr. and Wasyl taking it easy";
	fam_arr[32][0] = "f_image_33.jpg";
	fam_arr[32][1] = "Wasyl with his lovely girls";
	fam_arr[33][0] = "f_image_34.jpg";
	fam_arr[33][1] = "Don't touch the remote control!";
	fam_arr[34][0] = "f_image_35.jpg";
	fam_arr[34][1] = "Wasyl and Mila enjoying time at St. Joseph's Oratory in Canada";
	fam_arr[35][0] = "f_image_36.jpg";
	fam_arr[35][1] = "Steve and Wasyl enjoying the view";
	fam_arr[36][0] = "f_image_37.jpg";
	fam_arr[36][1] = "I know that my wife wants my soup!";
	fam_arr[37][0] = "f_image_38.jpg";
	fam_arr[37][1] = "Helen and Wasyl enjoying their stroll on the beach";
	fam_arr[38][0] = "f_image_39.jpg";
	fam_arr[38][1] = "Christmas at the Kotys home";
	fam_arr[39][0] = "f_image_40.jpg";
	fam_arr[39][1] = "Awaiting the arrival of Isabella, Wasyl's first grandchild";
	fam_arr[40][0] = "f_image_41.jpg";
	fam_arr[40][1] = "Wasyl enjoying his role as grandfather with Isabella";
	fam_arr[41][0] = "f_image_42.jpg";
	fam_arr[41][1] = "Taking a snooze together";
	fam_arr[42][0] = "f_image_43.jpg";
	fam_arr[42][1] = "Ola holding Isabella next to her Didi (Wasyl)";
	fam_arr[43][0] = "f_image_44.jpg";
	fam_arr[43][1] = "Waiting for Didi to finish his drink!";
	fam_arr[44][0] = "f_image_45.jpg";
	fam_arr[44][1] = "Being silly on the dance floor";
	fam_arr[45][0] = "f_image_46.jpg";
	fam_arr[45][1] = "Fun and smiles at a luau on Kauai";
	fam_arr[46][0] = "f_image_47.jpg";
	fam_arr[46][1] = "Dancing the night away at Danny's wedding";
	fam_arr[47][0] = "f_image_48.jpg";
	fam_arr[47][1] = "Buddies waiting for their drinks";
	fam_arr[48][0] = "f_image_49.jpg";
	fam_arr[48][1] = "Young couple with their first child, Ola";
	fam_arr[49][0] = "f_image_50.jpg";
	fam_arr[49][1] = "Wasyl and Helena's wedding party, August 12, 1972";
	
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	
	fnd_arr[0][0] = "i_img_01.jpg";
	fnd_arr[0][1] = "Health camp participants awaiting registration.";
	fnd_arr[1][0] = "i_img_02.jpg";
	fnd_arr[1][1] = "A Calcutta Kids Community Health Worker with a Calcutta Kids beneficiary looking over her medical records.";
	fnd_arr[2][0] = "i_img_03.jpg";
	fnd_arr[2][1] = "Health camp participants awaiting registration.";
	fnd_arr[3][0] = "i_img_04.jpg";
	fnd_arr[3][1] = "Calcutta Kids' Dr. Utpal Kumar Roy seeing patients at the weekly health camp.";
	fnd_arr[4][0] = "i_img_05.jpg";
	fnd_arr[4][1] = "Calcutta Kids' pharmacist, Mr. Radjeshyam, distributing prescribed medication after patients have been examined by the doctor.";
	fnd_arr[5][0] = "i_img_06.jpg";
	fnd_arr[5][1] = "Calcutta Kids' Community Health Worker, Laxmi Gupta, providing an injection to a pregnant woman.";
	fnd_arr[6][0] = "i_img_07.jpg";
	fnd_arr[6][1] = "Wrapping up the weekly health camp and attending to a few latecomers to the clinic.";
	fnd_arr[7][0] = "i_img_08.jpg";
	fnd_arr[7][1] = "A Calcutta Kids child is weighed before being examined by health camp doctor.";
	fnd_arr[8][0] = "i_img_09.jpg";
	fnd_arr[8][1] = "Wrapping up the weekly health camp and attending to a few latecomers to the clinic.";
	fnd_arr[9][0] = "i_img_10.jpg";
	fnd_arr[9][1] = "A Calcutta Kids' mother and infant.";
	fnd_arr[10][0] = "i_img_11.jpg";
	fnd_arr[10][1] = "Calcutta Kids health camp staff with a few volunteers. From right, Managing Director, Kalyan Roy, Advisory member, Lucy Singh, Project Coordinator, Sumana Ghosh, Community Health Worker, Laxmi Gupta. Second from left, Community Health Worker, Jayshree Hella.";
	fnd_arr[11][0] = "i_img_12.jpg";
	fnd_arr[11][1] = "";
	fnd_arr[12][0] = "i_img_13.jpg";
	fnd_arr[12][1] = "Community Health Worker, Jayshree Hella, weighing a child before being examined by the doctor.";
	fnd_arr[13][0] = "i_img_14.jpg";
	fnd_arr[13][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[14][0] = "i_img_15.jpg";
	fnd_arr[14][1] = "Mothers and children participate as Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[15][0] = "i_img_16.jpg";
	fnd_arr[15][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[16][0] = "i_img_17.jpg";
	fnd_arr[16][1] = "Community Health Workers fill out registration cards at weekly health camp.";
	fnd_arr[17][0] = "i_img_18.jpg";
	fnd_arr[17][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. From left, Micro Health Insurance director, Srivatsa Marthi, Director of Calcutta Kids, Noah Levinson holding a Calcutta Kids child, dear friend of Milena Kotys and of Calcutta Kids, Anice George visiting from New Jersey .";
	fnd_arr[18][0] = "i_img_19.jpg";
	fnd_arr[18][1] = "A Calcutta Kids child.";
	fnd_arr[19][0] = "i_img_20.jpg";
	fnd_arr[19][1] = "From Left, Noah Levinson, Milena Kotys and Srivatsa Marthi as Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[20][0] = "i_img_21.jpg";
	fnd_arr[20][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[21][0] = "i_img_22.jpg";
	fnd_arr[21][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[22][0] = "i_img_23.jpg";
	fnd_arr[22][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[23][0] = "i_img_24.jpg";
	fnd_arr[23][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. Sumana, Laxmi and Jayshree maintain order at the entrance.";
	fnd_arr[24][0] = "i_img_25.jpg";
	fnd_arr[24][1] = "Salter scale used to weigh infants.";
	fnd_arr[25][0] = "i_img_26.jpg";
	fnd_arr[25][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008.";
	fnd_arr[26][0] = "i_img_27.jpg";
	fnd_arr[26][1] = "Calcutta Kids' pharmacist, Mr. Radjeshyam, distributing prescribed medication after patients have been examined by the doctor.";
	fnd_arr[27][0] = "i_img_28.jpg";
	fnd_arr[27][1] = "Nasrin Begum, Calcutta Kids Community Organizer.";
	fnd_arr[28][0] = "i_img_29.jpg";
	fnd_arr[28][1] = "Calcutta Kids child.";
	fnd_arr[29][0] = "i_img_30.jpg";
	fnd_arr[29][1] = "Community Health Worker, Jayshree Hella prepares to give a pregnant woman an injection.";
	fnd_arr[30][0] = "i_img_31.jpg";
	fnd_arr[30][1] = "Calcutta Kids child not wanting to be weighed.";
	fnd_arr[31][0] = "i_img_32.jpg";
	fnd_arr[31][1] = "Health camp participants awaiting registration";
	fnd_arr[32][0] = "i_img_33.jpg";
	fnd_arr[32][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. From right front: Milena Kotys, Anice George, Becca Cooper, Mr. Radjeshyam, Bunni, Sumana, Laxmi, Jayshree, Debbi Wilson and Munni. In back, Stephanie Wilson and Noah.";
	fnd_arr[33][0] = "i_img_34.jpg";
	fnd_arr[33][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. Milena Kotys and Anice George are given flowers from Calcutta Kids mothers who are grateful for the gift of the Kotys Memorial Fund which will finance the Calcutta Kids weekly health camps.";
	fnd_arr[34][0] = "i_img_35.jpg";
	fnd_arr[34][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. Jayshree prepares for the ribbon cutting ceremony officially launching the Kotys Memorial Fund.";
	fnd_arr[35][0] = "i_img_36.jpg";
	fnd_arr[35][1] = "Milena Kotys officially launches the Kotys Memorial Fund in honor of her late father, Wasyl Kotys.";
	fnd_arr[36][0] = "i_img_37.jpg";
	fnd_arr[36][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. From Left: Milena, Kalyan Roy, (Managing Director, Calcutta Kids) and Noah.";
	fnd_arr[37][0] = "i_img_38.jpg";
	fnd_arr[37][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. Anice, Dr. Roy and Milena.";
	fnd_arr[38][0] = "i_img_39.jpg";
	fnd_arr[38][1] = "Calcutta Kids mother and child.";
	fnd_arr[39][0] = "i_img_40.jpg";
	fnd_arr[39][1] = "Mothers and Children waiting in line to see the doctor.";
	fnd_arr[40][0] = "i_img_41.jpg";
	fnd_arr[40][1] = "An older brother bringing his younger brother to the Calcutta Kids weekly health camp.";
	fnd_arr[41][0] = "i_img_42.jpg";
	fnd_arr[41][1] = "Slum children watching the Kotys Memorial Fund inauguration.";
	fnd_arr[42][0] = "i_img_43.jpg";
	fnd_arr[42][1] = "Milena riding a cycle rickshaw through the slums of Howrah.";
	fnd_arr[43][0] = "i_img_44.jpg";
	fnd_arr[43][1] = "Milena walking through the slums of Howrah.";
	fnd_arr[44][0] = "i_img_45.jpg";
	fnd_arr[44][1] = "Mothers, children and grandmothers awaiting medical treatment at the Calcutta Kids weekly health camp";
	fnd_arr[45][0] = "i_img_46.jpg";
	fnd_arr[45][1] = "Calcutta Kids child with his grandmother.";
	fnd_arr[46][0] = "i_img_47.jpg";
	fnd_arr[46][1] = "Calcutta Kids Community Health Workers registering health camp patients.";
	fnd_arr[47][0] = "i_img_48.jpg";
	fnd_arr[47][1] = "Calcutta Kids mother and child.";
	fnd_arr[48][0] = "i_img_49.jpg";
	fnd_arr[48][1] = "Kotys Memorial Fund celebrates inauguration ceremony at the Calcutta Kids health camp, February 19th 2008. Milena Kotys and Anice George are given flowers from Calcutta Kids mothers who are grateful for the gift of the Kotys Memorial Fund which will finance the Calcutta Kids weekly health camps. Also in the photo is Nasrin Begum, Calcutta Kids Community Organizer.";
	fnd_arr[49][0] = "i_img_50.jpg";
	fnd_arr[49][1] = "Residential area of the slum where Calcutta Kids weekly health camp beneficiaries reside.";
	
	
	
	//------------------------------------------------------------------------------------------
	
	function load_img(el_img_id, el_nav_id, img_arr, img_pos, img_fol){
			
		var int_tot_img = 0;	//total no of images
		var int_img_cnt_rw = 0;	//image count per row
		var int_img_pos = img_pos;	//current image no
		var int_cnt = 0;		//image ount for for loop
		var str_cont = "" ;		//stores the html content
		
		int_tot_img = img_arr.length;	//get the total no of images in the array
		
		if (img_fol == "fund"){
			_arr = fnd_arr;
			img_arr = fnd_arr;
		}else if (img_fol == "family"){
			_arr = fam_arr;
			img_arr = fam_arr;
		}
		
		//alert ("el_img_id = " + el_img_id + " el_nav_id = " + el_nav_id + " img_pos = " + img_pos + " img_fol = " + img_fol);
		
		for (int_cnt = int_img_pos; int_cnt < (int_img_pos + 10); int_cnt ++){
			
			if (int_cnt < (int_img_pos + 5)){	//create the first row with 5 images
				str_cont = str_cont + "<td><img src=\"images/" + img_fol + "/thumbs/" + img_arr[int_cnt][0] + "\" " + 
				"onclick=\"newWin(" + int_cnt + ", 576, 470, " + int_img_pos + ", '" + img_fol + "');\" /></td>";
				if ((int_cnt + 1) != (int_img_pos + 5)){
					str_cont = str_cont + "<td width=\"4\"></td>";
				}
				
				if (int_cnt == int_img_pos){
					str_cont = "<table><tr>" + str_cont;
				}else if ((int_cnt + 1) == (int_img_pos + 5)){
					str_cont =  str_cont + "</tr><tr><td colspan=\"10\" height=\"18\"></td></tr><tr>";
				}
				
			}else if (int_cnt < (int_img_pos + 10)){	//create the second row with another 5 images
				str_cont = str_cont + "<td><img src=\"images/" + img_fol + "/thumbs/" + img_arr[int_cnt][0] + "\" " + 
				"onclick=\"newWin(" + int_cnt + ", 576, 470, " + int_img_pos + ", '" + img_fol + "');\" /></td>";
				
				if ((int_cnt + 1) != (int_img_pos + 10)){
					str_cont = str_cont + "<td width=\"4\"></td>";
				}
				if ((int_cnt + 1) == (int_img_pos + 10)){
					str_cont =  str_cont + "</tr></table>";
				}
			}
		}	//end of or
		
		document.getElementById(el_img_id).innerHTML = str_cont;	//display images
				
		str_cont = "";
		
		//prepare and display navigation next/previous
		if (int_cnt < img_arr.length){		//there are images left in the array
			str_cont = "<table style=\"font-size:10px; color:#999999\"><tr>";
			//check and display previous button
			if (int_cnt > 10){
				str_cont = str_cont + "<td width=\"80\" align=\"center\" valign=\"middle\"><span style=\"font-size:10px; color:#333333; cursor:pointer;\" onclick=\"load_img('" + 
				el_img_id + "', '" + el_nav_id + "', _arr, " + (img_pos - 10) + ", '" + img_fol + "');\"><< Previous</span></td><td width=\"378\"></td>";
			}else{
				str_cont = str_cont + "<td width=\"80\" align=\"center\"></td><td width=\"378\"></td>";
			}
			//display next button
			str_cont = str_cont + "<td width=\"80\" align=\"center\" valign=\"middle\"><span style=\"font-size:10px; color:#333333; cursor:pointer;\" onclick=\"load_img('" + 
			el_img_id + "', '" + el_nav_id + "', _arr, " + (int_cnt) + ", '" + img_fol+ "');\">Next >></span></td>";
			
			str_cont = str_cont + "</tr></table>";
			
		}else if (int_cnt == img_arr.length){	//the count reaches the end of array
			str_cont = "<table style=\"font-size:10px; color:#999999\"><tr>";
			str_cont = str_cont + "<td width=\"80\" align=\"center\" valign=\"middle\"><span style=\"font-size:10px; color:#333333; cursor:pointer;\" onclick=\"load_img('" + 
			el_img_id + "', '" + el_nav_id + "', _arr, " + (img_pos - 20) + ", '" + img_fol + 
			"');\"><< Previous</span></td><td width=\"378\"></td><td width=\"80\" align=\"center\" valign=\"middle\"></td>";
			str_cont = "<table style=\"font-size:10px; color:#333333\"><tr>" + str_cont + "</tr></table>";
		}	
		
		//alert (str_cont);
		document.getElementById(el_nav_id).innerHTML = str_cont;
		
	}	//end of function load_img

	//display single image
	function load_img_single(el_img_id, el_nav_id, img_arr, img_id, img_fol){
		
		var str_cont = "";
		var _arr_nm;
		var img_arr_cnt = 0;
		
		//alert("el_img_id = " + el_img_id + " el_nav_id = " + el_nav_id + " img_id = " + img_id);
		
		if (img_fol == "fund"){
			_arr_nm = "fnd_arr";
			document.getElementById(el_img_id).innerHTML = "<img src=\"images/" + img_fol + "/big/" + img_arr[img_id][0] + "\" />";
			img_arr_cnt = img_arr.length;
		}else if (img_fol == "family"){
			_arr_nm = "fam_arr";
			document.getElementById(el_img_id).innerHTML = "<img src=\"images/" + img_fol + "/big/" + img_arr[img_id][0] + "\" />";
			img_arr_cnt = img_arr.length;
		}
		//alert(img_arr_cnt);
		//prepare and display navigation next/previous
		if ((img_id + 1) < img_arr_cnt){		//there are images left in the array
			str_cont = "<table style=\"font-size:10px; color:#999999\"><tr>";
			//check and display previous button
			if (img_id != 0){
				str_cont = str_cont + "<td width=\"60\" align=\"center\" valign=\"middle\"><span style=\"font-size:10px; color:#333333; cursor:pointer;\"  onclick=\"load_img_single('" + 
				el_img_id + "', '" + el_nav_id + "', " + _arr_nm + ", " + (img_id - 1) + ", '" + img_fol + 
				"');\"><< Previous</span></td><td width=\"450\" align=\"center\" style=\"color:#333333; font-size:12px;\">" + 
				img_arr[img_id][1] + "</td><td width=\"60\" align=\"center\" valign=\"middle\"></td>";
			}else{
				str_cont = str_cont + "<td width=\"60\" align=\"center\" valign=\"middle\"></td><td width=\"450\" align=\"center\" style=\"color:#333333; font-size:12px;\">" + img_arr[img_id][1] + "</td><td width=\"60\" align=\"center\" valign=\"middle\"></td>";
			}
			//display next button
			str_cont = str_cont + "<td width=\"60\" align=\"center\" valign=\"middle\"><span style=\"font-size:10px; color:#333333; cursor:pointer;\" onclick=\"load_img_single('" + 
			el_img_id + "', '" + el_nav_id + "', " + _arr_nm + ", " + (img_id + 1) + ", '" + img_fol+ "');\">Next >></span></td>";
			
			str_cont = str_cont + "</tr></table>";
			
		}else if ((img_id + 1) == img_arr_cnt){	//the count reaches the end of array
			str_cont = "<table style=\"font-size:10px; color:#999999\"><tr>";
			str_cont = str_cont + "<td width=\"60\" align=\"center\" valign=\"middle\"><span style=\"font-size:10px; color:#333333; cursor:pointer;\" onclick=\"load_img_single('" + 
			el_img_id + "', '" + el_nav_id + "', " + _arr_nm + ", " + (img_id - 1) + ", '" + img_fol + 
			"');\"><< Previous</span></td><td width=\"450\" align=\"center\" style=\"color:#333333; font-size:12px;\">"+ img_arr[img_id][1] + "</td><td width=\"60\" align=\"center\" valign=\"middle\"></td>";
			str_cont = str_cont + "</tr></table>";
		}	
		
		//alert (str_cont);
		document.getElementById(el_nav_id).innerHTML = str_cont;
	
	}	
	
	function newWin(img_id, imgWdth, imgHght, img_pos, img_fol){
		
		dochght = eval(imgHght) + 100;
		
		if (img_fol == "fund"){
			_arr_nm = "fnd_arr";
		}else if (img_fol == "family"){
			_arr_nm = "fam_arr";
		}
				
		//alert("img_id = " + img_id + "img_pos = " + img_pos);

		var img_w = window.open("","","status=yes,width="+ (imgWdth + 15) +",height="+ dochght +",top="+((screen.height-dochght)/5)+",left="+((screen.width-imgWdth)/2.1));
		var markup = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n<head>\n<title></title>\n<script language="javascript" type="text/javascript" src="includes/gallery_js.js"></script></head>\n<body onload="load_img_single(\'_img\', \'_nav\',' + _arr_nm + ',' + img_id + ', \'' + img_fol + '\');"><table width="576" cellpadding="0" cellspacing="0"><tr><td width="576" height="470" valign="top" align="center" id="_img" style="background-color:#FFFFCC"></td></tr><tr><td height="6"></td> </tr><tr><td width="576" height="12" id="_nav"></td></tr></table></body>\n</html>';
		img_w.document.write(markup);
		img_w.document.close();	
		
		/*;
			if (img_fol == "fund"){																																																																					   				markup = markup + 'fnd_arr';
			}else{
				markup = markup + 'fam_arr';
			}
			markup = markup + ', ' + */
	}	
	
	//------------------------------------------------------------------------------------------------------------
	//function for cookies
	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}else{
			var expires = "";
		}
		document.cookie = name+"="+value+expires+"; path=/";			
	}

	function readCookie(name) {
		var nm = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' '){
				c = c.substring(1,c.length);
				if (c.indexOf(nm) == 0){
					return c.substring(nm.length,c.length);
				}
			}
		}
		return null;
	}
	
	//----------------------------------------------------------------------------------------------------------------------
	
	var glb_flg = false;
	
	function getposOffset(what, offsettype){
		var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
		var parentEl=what.offsetParent;
		while (parentEl!=null){
			totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
			parentEl=parentEl.offsetParent;
		}
		return totaloffset;
	}
	function inchngBG(elm_id){
		document.getElementById(elm_id).style.background = "#F9E9CE"
	}
	function outchngBG(elm_id){
		//alert()
		document.getElementById(elm_id).style.background = "#F8F4E9"
	}

	function xstooltip_show(tooltipId, parentId, evt, el_id, hght, wdth){
	
    	it = document.getElementById(tooltipId);
    	img = document.getElementById(parentId);
	
		//////////////////////////////////////////////////
		it2 = document.getElementById('hvr_1'); 
		it2.style.visibility = 'hidden'; 
		
		
		
		//////////////////////////////////////////////////
		x = (screen.width / 2) - (hght / 2);
		y = (screen.height / 2) - (wdth / 2);
		
		it.style.top = y + 'px';
		it.style.left = x + 'px';
		
		//alert("x : " + x + " y : " + y);
    	glb_flg = true;
    	it.style.visibility = 'visible'; 
	}

	function xstooltip_hide(id, evt, parentId){
		
		var img2;
		var imgX;
		var imgY;
		var msX;
		var msY;
		
		img2 = document.getElementById(parentId);
				
		imgX = getposOffset(img2, "left");
		imgY = getposOffset(img2, "top");		
		msX = mouseX(evt) - 1;
		msY = mouseY(evt) - 1;
				
		if(((msX <= imgX) || (msX > (imgX + img2.width))) || ((msY <= imgY) || (msY > (imgY + img2.height)))){ 		
		 	it = document.getElementById(id); 
			it.style.visibility = 'hidden'; 
		}
	}
	
	function mouseX(evt) {
		if (evt.pageX) return evt.pageX; 
		else if (evt.clientX)
			return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); 
		else 
			return null;
	}
	
	function mouseY(evt) {
		if (evt.pageY) 
			return evt.pageY; 
		else if (evt.clientY)
			return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); 
		else 
			return null;
	}