image1 = new Image();
image2 = new Image();
image3 = new Image();
image4 = new Image();
image5 = new Image();
image6 = new Image();
image7 = new Image();
image8 = new Image();
image9 = new Image();
image10 = new Image();
image11 = new Image();
image12 = new Image();
image13 = new Image();
image14 = new Image();
image15 = new Image();
image16 = new Image();
		
image1.src = "images/tab_sizes_on.gif";
image2.src = "images/tab_sizes_off.gif";
image3.src = "images/tab_features_on.gif";
image4.src = "images/tab_features_off.gif";
image5.src = "images/tab_demo_on.gif";
image6.src = "images/tab_demo_off.gif";
image7.src = "images/tab_animations_on.gif";
image8.src = "images/tab_animations_off.gif";
image9.src = "images/tab_case_study_on.gif";
image10.src = "images/tab_case_study_off.gif";
image11.src = "images/tab_about_device_on.gif";
image12.src = "images/tab_about_device_off.gif";
image13.src = "images/tab_accessories_on.gif";
image14.src = "images/tab_accessories_off.gif";
image15.src = "images/tab_instructions_on.gif";
image16.src = "images/tab_instructions_off.gif";

		
function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function show_photo(pFileName, pTitle, pCaption) {
							
	// specify window parameters
	photoWin = window.open( "", "photo", "width=660,height=600,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
	
	// wrote content to window
	photoWin.document.write('<html><head><title>' + pTitle + '</title></head>');
	photoWin.document.write('<body style="background-color:#959595; margin:0px;">');
	photoWin.document.write('<table cellspacing="0" cellpadding="10" border="0" style="width:100%; height:100%;"><tr><td valign="top" align="center" height="100%" width="100%" style="position:relative; left:0px; top:0px; background-image:url(images/bggrad.jpg); background-repeat:repeat-x;">');
	photoWin.document.write('<table cellspacing="1" cellpadding="10" border="0" style="background-color:#000000; width:500px;"><tr><td style="background-color:#ffffff; font-family:arial; font-size:11px; color:#000000;">');
	photoWin.document.write('<b style="font-size:14px;">' + pTitle + '</b><br>');
	photoWin.document.write('' + pCaption + '');
	photoWin.document.write('<div style="text-align:center;">');
	photoWin.document.write('<img src="' + pFileName + '" alt="' + pTitle + '" border="0" style="margin-top:5px; border:#000000 1px solid;">');
	photoWin.document.write('</div>© Infiniti Medical ');
	photoWin.document.write('</td></tr></table>	');
	photoWin.document.write('</td></tr></table>');
	photoWin.document.write('</body></html>');
	photoWin.document.close();	
	
	// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();
}
