function SwitchOn(imgName, theID, imgNumber, imgny) {
		if(imgNumber) {
			count = 1;
			while (count <= imgNumber) {
				theName = imgName + "_" + count;
				/*theID = imgName.charAt(imgName.length -1);*/
				
				if(imgny == null) 	{ document.images[theName].src  =  eval(theName + "_on.src"); }
				if(imgny != 2) 		{ document.images[theName].style.borderColor = "#FC0"; }
				document.getElementById("note_" +theID).style.display = "inline";
				count++;
			}			
			return true;
		}
		
		else {
		document.images[imgName].src  =  eval(imgName + "_on.src");
		return true; 
		}
	}

	function SwitchOff(imgName, theID, imgNumber, imgny) {
		if(imgNumber) { 
				count = 1;
				while (count <= imgNumber) {
					theName = imgName + "_" + count;
					/*theID = imgName.charAt(imgName.length -1);*/
					
					if(imgny == null) 	{ document.images[theName].src  =  eval(theName + "_off.src"); }
					if(imgny != 2) 		{ document.images[theName].style.borderColor = "#000"; }
					document.getElementById("note_" +theID).style.display = "none";
					count++;
				}			
				return true;
			}
			
			else {
			document.images[imgName].src  =  eval(imgName + "_off.src");
			return true;  
			}
	}
	
	function SwitchGray(imgName, theID, imgNumber, imgny) {
		if(imgNumber) { 
				count = 1;
				while (count <= imgNumber) {
					theName = imgName + "_" + count;
					/*theID = imgName.charAt(imgName.length -1);*/
					
					if(imgny == null) 	{ document.images[theName].src  =  eval(theName + "_gray.src"); }
					if(imgny != 2) 		{ document.images[theName].style.borderColor = "#000"; }
					document.getElementById("note_" +theID).style.display = "none";
					count++;
				}			
				return true;
			}
			
			else {
			document.images[imgName].src  =  eval(imgName + "_off.src");
			return true;  
			}
	}
	
	
	
	
//Open pop-up window function
function openViewer(theUrl) {
	theName = "pop_viewer"
	window.open(theUrl, theName, 'menubar=0,status=0,scrollbars=1,resizable=1,toolbar=0,location=0,directories=0');
	}
	
	