var x = '';
function indexpic(path) {
	r1 = Math.floor(Math.random() * 10);
	r2 = Math.floor(Math.random() * 10);
	r3 = Math.floor(Math.random() * 10);
	r4 = Math.floor(Math.random() * 10);
	x = r1.toString() + r2.toString() + r3.toString() + r4.toString();
	pic = '<img src="'+path+'images/' + r1 + '.gif" style="border:none;padding:0;" />'
	pic += '<img src="'+path+'images/' + r2 + '.gif" style="border:none;padding:0;" />'
	pic += '<img src="'+path+'images/' + r3 + '.gif" style="border:none;padding:0;" />'
	pic += '<img src="'+path+'images/' + r4 + '.gif" style="border:none;padding:0;" />'
	document.getElementById("num").innerHTML = pic;
	document.getElementById("num2").value = x;
} 
