// Flash

function drawSwf(url, w, h, t){
	if(drawSwf.arguments.length > 3) var wm = "transparent";
	else var wm = "opaque";
	document.write('<object width="' +w+ '" height="' +h+ '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8">');
	document.write('<param name="movie" value="' +url+ '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="bgcolor" value="#000" />');
	document.write('<param name="wmode" value="' +wm+ '" />');
	document.write('<param name="allowScriptAccess" value="always">');
	document.write('<embed src="' +url+ '" width="' +w+ '" height="' +h+ '" quality="high" menu="false" bgcolor="#000" wmode="' +wm+ '" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">');
	document.write('</embed>');
	document.write('</object>');
}

function drawFlv(url, w, h){
	document.write('<object width="' +w+ '" height="' +h+ '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8">');
	document.write('<param name="movie" value="' +url+ '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="bgcolor" value="#000" />');
	document.write('<param name="allowScriptAccess" value="always">');
	document.write('<embed src="' +url+ '" width="' +w+ '" height="' +h+ '" quality="high" menu="false" bgcolor="#000" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">');
	document.write('</embed>');
	document.write('</object>');
}

function drawIntro(url){
	document.write('<div id="intro" style="width:100%;height:100%;">');
	drawSwf(url, "100%", "100%")
	document.write('</div>');

	if(window.addEventListener){
		window.addEventListener("load", resetIntro, false);
		window.addEventListener("resize", resetIntro, false);
	} else if(window.attachEvent){
		window.attachEvent("onload", resetIntro);
		window.attachEvent("onresize", resetIntro);
	}
}

function resetIntro(){
	var w, h;
	if(window.innerWidth){
		w = window.innerWidth;
		h = window.innerHeight;
	} else if(document.documentElement && document.documentElement.clientWidth != 0){
		w = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	} else if(document.body){
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	}
	if(w < 1000) document.getElementById("intro").style.width = "1000px";
	else document.getElementById("intro").style.width = "100%";
	if(h < 673) document.getElementById("intro").style.height = "673px";
	else document.getElementById("intro").style.height = "100%";
}

function drawPG(url, w, h){
	var n = location.hash.substr(3, 1);
	if(n >= 1 && n <= 3) url += "?pg=" + n;
	drawSwf(url, 970, 530, 1);
}

function showPhoto(id){
	var a = document.getElementById(id);
	myLightbox.start(a);
}



// SwapImage

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



// Nomenclature

div_id = "mean";
timer = 1;

txt = new Array();

txt[1] = new Array();
txt[1][1] = "Depth-of-field preview button";
txt[1][2] = "Sub-command dial";
txt[1][3] = "Function button";
txt[1][4] = "Sub-command dial for vertical shooting";
txt[1][5] = "Self-timer lamp";
txt[1][6] = "Flash sync terminal cover";
txt[1][7] = "Ten-pin remote terminal cover";
txt[1][8] = "Lens release button";
txt[1][9] = "Focus-mode selector";
txt[1][10] = "Mirror";

txt[2] = new Array();
txt[2][1] = "Viewfinder";
txt[2][2] = "Viewfinder eyepiece";
txt[2][3] = "Eyepiece shutter lever";
txt[2][4] = "Delete button / Format button";
txt[2][5] = "Playback button";
txt[2][6] = "Monitor";
txt[2][7] = "Menu button";
txt[2][8] = "Thumbnail button / Playback zoom button";
txt[2][9] = "Protect button / Help button / Info. button";
txt[2][10] = "OK button";
txt[2][11] = "Speaker";
txt[2][12] = "Rear control panel";
txt[2][13] = "ISO sensitivity button / Two-button reset button";
txt[2][14] = "Image quality / size button";
txt[2][15] = "White balance button / Two-button reset button";
txt[2][16] = "Microphone";
txt[2][17] = "AF-ON button";
txt[2][18] = "Main command dial";
txt[2][19] = "AE/AF lock button";
txt[2][20] = "Multi selector";
txt[2][21] = "Focus selector lock";
txt[2][22] = "Memory card slot cover";
txt[2][23] = "AF-area mode selector";
txt[2][24] = "AF-ON button for vertical shooting";
txt[2][25] = "Main command dial for vertical shooting";
txt[2][26] = "Microphone button";

txt[3] = new Array();
txt[3][1] = "Power switch";
txt[3][2] = "Shutter-release button";
txt[3][3] = "Exposure compensation button";
txt[3][4] = "Exposure mode button / Format button";
txt[3][5] = "Eyelet for camera strap";
txt[3][6] = "Top control panel";
txt[3][7] = "Accessory shoe (for optional flash unit)";
txt[3][8] = "Flash mode button";
txt[3][9] = "Bracketing button";
txt[3][10] = "Command lock button";
txt[3][11] = "Release mode dial";
txt[3][12] = "Release mode dial lock release";
txt[3][13] = "Eyelet for camera strap";

txt[4] = new Array();
txt[4][1] = "Tripod socket";

txt[5] = new Array();
txt[5][1] = "Focal plane mark";
txt[5][2] = "USB connector cover";
txt[5][3] = "Connector cover";
txt[5][4] = "USB connector";
txt[5][5] = "A/V connector";
txt[5][6] = "HDMI connector";
txt[5][7] = "DC-IN connector for optional AC Adapter EH-6";
txt[5][8] = "Battery chamber cover";
txt[5][9] = "Battery chamber cover latch";

txt[6] = new Array();
txt[6][1] = "Diopter adjustment knob";
txt[6][2] = "Metering selector lock button";
txt[6][3] = "Metering selector";
txt[6][4] = "Shutter-release button for vertical shooting";
txt[6][5] = "Vertical shooting shutter-release button lock";

save = 0;
function onMark(one, two){
	if(save != 0){
		clearTimeout(TM);
		hideText();
	}
	save = one;
	document.getElementById(div_id+one).innerHTML = "<span>" +txt[one][two]+ "</span>";
}

function outMark(){
	TM = setTimeout("hideText()", Math.round(timer*1000));
}

function hideText(){
	document.getElementById(div_id+save).innerHTML = "&nbsp;";
}



// pageTopScroll

function pageTopScroll() {
var scrj = 1;
var scdist = document.body.parentNode.scrollTop;
if(scrj<50 && scdist) {
scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
scrj++;
scrollBy(0,-scdist);
setTimeout("pageTopScroll()",20);
} else {
scrollTo(0,0);
scrj = 1;
}
} 


