i have made two switches.one is "show" and the other is "hide".But apart from this i want to show numbers like "show image1/2" using only one script.how can i manage that:
Code:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
#imag1,#imag2{
	width:300px;
	height:300px;
	display:none;
}
</style>
<script>

function show(imgs,bttn){
	

      var s=document.getElementById(imgs);
	  var t=document.getElementById(bttn);
	 
	(t.value=="show")?(s.style.display="block",t.value="hide"):(s.style.display="none",t.value="show");
}

</script>
</head>

<body>
<div><input type="button" value="show" onClick="retrun false" onMouseDown="show('imag1','btn1');" id="btn1"></div>
<img src="image1.jpg" id="imag1">
<div><input type="button" value="show" onClick="retrun false" onMouseDown="show('imag2','btn2');" id="btn2"></div>
<img src="image2.jpg" id="imag2">

</body>
</html>