	function getObj(name) {
	obj = document.getElementById(name);
	return obj;
	}

	var ticked_box = new Image();
	ticked_box.src="/images/tick_box_checked.gif";
	var unticked_box = new Image();
	unticked_box.src="/images/tick_box.gif";
	
	
	function tickBox(tick_id) {
				tickObj = getObj("tick_"+tick_id);
				adObj = getObj("ad_ticked["+tick_id+"]");
		if (tickObj.src.indexOf("tick_box.gif")<0 ) {
				tickObj.src = unticked_box.src;
				adObj.value = "no";
		}
		else {
				tickObj.src = ticked_box.src;
				adObj.value = "yes";							
		}
	}
	
	
	function showPlum(plumID) {
			plumObj = getObj(plumID);
		if (plumObj.style.display == "block") {
			plumObj.style.display = "none";
		}
		else {
			plumObj.style.display = "block";		
		}
	}
	
	function dropDown(drop_downID) {
		dropObj = getObj(drop_downID);
		if (dropObj) {
			if (dropObj.style.display == "block") {
				dropObj.style.display = "none";
			}
			else {
				dropObj.style.display = "block";		
			}
		}
	}
	
	
	var closed_btn = new Image();
	closed_btn.src="/images/close_info.gif";
	var open_btn = new Image();
	open_btn.src="/images/more_info.gif";	
	
	var closed_btn_78 = new Image();
	closed_btn_78.src="/images/close_info_78.gif";
	var open_btn_78 = new Image();
	open_btn_78.src="/images/more_info_78.gif";		
	
	faqbtnList = new Array("oc_btn_1", "oc_btn_2", "oc_btn_3", "oc_btn_4", "oc_btn_5", "oc_btn_6", "oc_btn_7", "oc_btn_8");	
	
	function FaqOcButton(buttonId) {
				buttonObj = getObj(buttonId);	
		if (buttonObj.src.indexOf("close_info.gif")<0 ) {
			for (i in faqbtnList) {
				btnObj = getObj(faqbtnList[i]);
				btnObj.src = open_btn.src;
			}	
			buttonObj.src = closed_btn.src;			
		}
		else {
			for (i in faqbtnList) {
				btnObj = getObj(faqbtnList[i]);
				btnObj.src = open_btn.src;
			}
			buttonObj.src = open_btn.src;						
		}
	}	
	
	faqList = new Array("faq_dd_1", "faq_dd_2", "faq_dd_3", "faq_dd_4", "faq_dd_5", "faq_dd_6", "faq_dd_7", "faq_dd_8");

	function faqDropDown(dropID) {
		if (dropID != '') {
			dropObj = getObj(dropID);
		}
		if ((dropID != '') && (dropObj.style.display == "block")) {
			dropObj.style.display = "none";
		} else {				
			for (i in faqList) {
				dropObj = getObj(faqList[i]);
				dropObj.style.display = "none";
			}
			if (dropID != '') {
				dropObj = getObj(dropID);
				dropObj.style.display = "block";
			}
		}
	}
	
	
	ttbtnList = new Array("oc_btn_1", "oc_btn_2", "oc_btn_3", "oc_btn_4", "oc_btn_5", "oc_btn_6");	
	
	function ttOcButton(buttonId) {
				buttonObj = getObj(buttonId);	
		if (buttonObj.src.indexOf("close_info.gif")<0 ) {
			for (i in ttbtnList) {
				btnObj = getObj(ttbtnList[i]);
				btnObj.src = open_btn.src;
			}	
			buttonObj.src = closed_btn.src;			
		}
		else {
			for (i in ttbtnList) {
				btnObj = getObj(ttbtnList[i]);
				btnObj.src = open_btn.src;
			}
			buttonObj.src = open_btn.src;						
		}
	}	
	
	ttList = new Array("tt_dd_1", "tt_dd_2");

	function ttDropDown(dropID) {
		if (dropID != '') {
			dropObj = getObj(dropID);
		}
		if ((dropID != '') && (dropObj.style.display == "block")) {
			dropObj.style.display = "none";
		} else {				
			for (i in ttList) {
				dropObj = getObj(ttList[i]);
				dropObj.style.display = "none";
			}
			if (dropID != '') {
				dropObj = getObj(dropID);
				dropObj.style.display = "block";
			}
		}
	}
	
	
	npbtnList = new Array("oc_btn_1", "oc_btn_2", "oc_btn_3", "oc_btn_4");	
	
	function npOcButton(buttonId) {
				buttonObj = getObj(buttonId);	
		if (buttonObj.src.indexOf("close_info.gif")<0 ) {
			for (i in npbtnList) {
				btnObj = getObj(npbtnList[i]);
				btnObj.src = open_btn.src;
			}	
			buttonObj.src = closed_btn.src;			
		}
		else {
			for (i in npbtnList) {
				btnObj = getObj(npbtnList[i]);
				btnObj.src = open_btn.src;
			}
			buttonObj.src = open_btn.src;						
		}
	}	
	
	npList = new Array("np_dd_1", "np_dd_2", "np_dd_3", "np_dd_4");

	function npDropDown(dropID) {
		if (dropID != '') {
			dropObj = getObj(dropID);
		}
		if ((dropID != '') && (dropObj.style.display == "block")) {
			dropObj.style.display = "none";
		} else {				
			for (i in npList) {
				dropObj = getObj(npList[i]);
				dropObj.style.display = "none";
			}
			if (dropID != '') {
				dropObj = getObj(dropID);
				dropObj.style.display = "block";
			}
		}
	}
	
	pebtnList = new Array("pe_btn_1", "pe_btn_2", "pe_btn_3", "pe_btn_4");	
	
	function peOcButton(buttonId) {
				buttonObj = getObj(buttonId);	
		if (buttonObj.src.indexOf("close_info_78.gif")<0 ) {
			for (i in pebtnList) {
				btnObj = getObj(pebtnList[i]);
				btnObj.src = open_btn_78.src;
			}	
			buttonObj.src = closed_btn_78.src;			
		}
		else {
			for (i in pebtnList) {
				btnObj = getObj(pebtnList[i]);
				btnObj.src = open_btn_78.src;
			}
			buttonObj.src = open_btn_78.src;						
		}
	}	
	
	peList = new Array("pe_dd_1", "pe_dd_2", "pe_dd_3", "pe_dd_4");

	function peDropDown(dropID) {
		if (dropID != '') {
			dropObj = getObj(dropID);
		}
		if ((dropID != '') && (dropObj.style.display == "block")) {
			dropObj.style.display = "none";
		} else {				
			for (i in peList) {
				dropObj = getObj(peList[i]);
				dropObj.style.display = "none";
			}
			if (dropID != '') {
				dropObj = getObj(dropID);
				dropObj.style.display = "block";
			}
		}
	}
	
	
	function questionArea() {
		questObj = getObj('question_area');
		if (questObj.style.display == "block") {
			questObj.style.display = "none";
		}
		else {
			questObj.style.display = "block";		
		}		
	}
	
	
	function countEntries(amount, tick_id) {
		amount = parseInt(amount);
		var current_value = getObj("entries").innerText;
		current_value = parseInt(current_value);	
		tickObj = getObj(tick_id);
		
		if (tickObj.src.indexOf("tick_box.gif")<0 ) {
			var new_value = ((current_value)+(amount));
			getObj("entries").innerText = new_value;
		} 
		else {
			var new_value = ((current_value)-(amount));
			getObj("entries").innerText = new_value;	
		}
		
	}
	
	function addToFavorites(urlAddress, pageName) { 
		if (window.external) { 
			window.external.AddFavorite(urlAddress,pageName) 
		} else { 
			alert("Sorry! Your browser doesn't support this function."); 
		} 
	} 

	var counter = 0;
	function populateMultiArray(ansfield, checkBox) {
		if (getObj(ansfield).value == "off") {
			if(getObj(checkBox).checked == true) {
				getObj(ansfield).value = "on";
				counter++;
			} else {
				getObj(ansfield).value = "off";
				counter--;				
			}
		}
		else if (getObj(checkBox).checked == true) {
			getObj(ansfield).value = "on";
			counter++;			
		} else {
			counter--;
			if (counter == 0) {
				getObj(ansfield).value = "off";
			}
		}
	}
	
