/*text array start*/
infotext =new Array();
infotext[1] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[2] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[3] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[4] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[5] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[6] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[7] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[8] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[9] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[10] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[11] = "       EMC3 Commuter - Pre-Production Prototype";
infotext[12] = "       EMC3 Commuter - Pre-Production Prototype";

function galleryover(num,totalgallery){	
	for(i=1;i<=totalgallery;i++){
		document.getElementById("menu"+i).style.display="none";
		if(i<10){
			document.getElementById("Smallimg"+i).src="images/EMC3_misc_0"+ i + ".gif";
		}else{
			document.getElementById("Smallimg"+i).src="images/EMC3_misc_"+ i + ".gif";
		}
	}
	if(num<10){
		document.getElementById("Smallimg"+num).src="images/EMC3_misc_0"+ num + "_f2.gif";
	}else{
		document.getElementById("Smallimg"+num).src="images/EMC3_misc_"+ num + "_f2.gif";
	}
	document.getElementById("menu"+num).style.display="block";
	document.getElementById("front_text").innerHTML=infotext[num];
}

function galleryinit(initnumber,inittotal){
	<!--large Image-->
	Largeimg=""
	for(i=1;i<=inittotal;i++){
		if(i<10){
			if(initnumber==i){
				Largeimg = Largeimg + "<img src='images/EMC3_misc_0"+i+".jpg' id='menu"+i+"' style='display:block'>"
			}else{
				Largeimg = Largeimg + "<img src='images/EMC3_misc_0"+i+".jpg' id='menu"+i+"' style='display:none'>"
			}	
		}else {
			Largeimg = Largeimg + "<img src='images/EMC3_misc_"+i+".jpg' id='menu"+i+"' style='display:none'>"
		}
	}
	<!--small Image-->
	Smallimg=""
	Smallimg = Smallimg +"<Table border='0' cellpadding='0' cellspacing='5'><tr>"
	checknumber=1;
	for(i=1;i<=inittotal;i++){
		if(i<10){
			if(i==1){
				Smallimg = Smallimg +"<td><img onmouseover=javascript:galleryover('" + i + "','" + inittotal + "'); id=Smallimg"+i+" src=images/EMC3_misc_0"+ i + "_f2.gif border=0>"
			}else{
				Smallimg = Smallimg +"<td><img onmouseover=javascript:galleryover('" + i + "','" + inittotal + "'); id=Smallimg"+i+" src=images/EMC3_misc_0"+ i + ".gif border=0>"
			}
			Smallimg = Smallimg +"</td>"
		}else{
			Smallimg = Smallimg +"<td>"
			Smallimg = Smallimg +"<img onmouseover=javascript:galleryover('" + i + "','" + inittotal + "'); id=Smallimg"+i+" src=images/EMC3_misc_"+ i + ".gif border=0>"
			Smallimg = Smallimg +"</td>"
		}
		if(Number(i%3)==0){
			Smallimg = Smallimg +"</tr>"
		}
		if(checknumber==inittotal){	
			for(k=Number(inittotal)+1;k<13;k++){
				Smallimg = Smallimg +"<td>"
				Smallimg = Smallimg +"<img src=images/s_blank.gif border=0>"
				Smallimg = Smallimg +"</td>"
				if((k%3)=="0"){
				Smallimg = Smallimg +"</tr>"
				}
			}
		}
		checknumber=checknumber+1;
	}
	Smallimg = Smallimg +"</table>"
			

	<!--all-->
	document.write("\
	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\
		<tR>\
			<td valign=\"top\">\
				<table width=\"100%\" border=\"7\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\">\
				<tr>\
					<td style=\"padding-bottom:10px; padding-top:10px; padding-left:10px; padding-right:10px; \" align=\"center\" valign=\" middle\" id=\"gallery_Largeimg\"></td>\
				</tr>\
				</table>\
				</td>\
	<!--small image-->\
	<td valign=\"top\" width=\"40\"></td>\
	<td valign=\"top\" width=\"240\">\
		<table border=\"7\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\">\
			<tr><td style=\"padding:5px\">\
				<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\
				<tr>\
				<td id=\"gallery_Smallimg\"></td>\
				</tr>\
				</table>\
			</td></tr>\
		</table>\
	</td>\
	</tr>\
	<tr>\
		<td>\
		<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\
			<tr>\
				<td style=\"padding-left:10px;padding-right:10px;padding-bottom:10px;\" id=\"front_text\">"+infotext[1]+"\</td>\
			</tr>\
		</table>\
		</td>\
		<td>\
		</td>\
	</tr>\
	</table>\
	");
	<!--largeimage output-->
	document.getElementById("gallery_Largeimg").innerHTML=Largeimg;
	<!--smallimage output -->
	document.getElementById("gallery_Smallimg").innerHTML=Smallimg;
}