//Java Script Documents

// Flash_banner +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function BnrFla(width,height,src){ 
    return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+" height="+height+"><param name=movie value="+src+"><param name=wmode value=transparent><param name=quality value=high ><embed src="+src+" quality=high  pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+width+" height="+height+" wmode=transparent></embed></object>"; 
} 

function writeflash(src){ 
    document.write(src); 
} 
// Ends +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


// Flash +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function openflash(width,height,src){ 
    return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width="+width+" height="+height+"><param name=movie value="+src+"><param name=quality value=high ><embed src="+src+" quality=high  pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+width+" height="+height+"></embed></object>"; 
} 

function writeflash(src){ 
    document.write(src); 
} 
// Ends +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



// IMAGE_CONTROL ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function findObj(n, d) { //v4.0
  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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Ends +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



// MENU +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function CommonMenu(MenuDirectory,flg) {
	document.open();
	document.write('<table width="790" border="0" cellpadding="0" cellspacing="0" summary="GlobalNavi">\n');
	document.write('<tr>\n');
	document.write('<td width="58"><a href="'+ MenuDirectory +'index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm1\',\'\',\''+ MenuDirectory +'img/tmenu01_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu01.gif" width="58" height="44" border="0" name="tm1" id="tm1" title="Top" alt="Top" /></a></td>\n');
	if (flg!="01"){
		document.write('<td width="112"><a href="'+ MenuDirectory +'knowledge/index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm2\',\'\',\''+ MenuDirectory +'img/tmenu02_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu02.gif" width="112" height="44" border="0" name="tm2" id="tm2" title="An introduction to camera shake" alt="An introduction to camera shake" /></a></td>\n');
	} else {
		document.write('<td width="112"><a href="'+ MenuDirectory +'knowledge/index.html"><img src="'+ MenuDirectory +'img/tmenu02_over.gif" width="112" height="44" border="0" name="tm2" id="tm2" title="An introduction to camera shake" alt="An introduction to camera shake" alt="An introduction to camera shake" alt="An introduction to camera shake" /></a></td>\n');
	}
	if (flg!="02"){
		document.write('<td width="137"><a href="'+ MenuDirectory +'scene/index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm3\',\'\',\''+ MenuDirectory +'img/tmenu03_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu03.gif" width="137" height="44" border="0" name="tm3" id="tm3" title="Shooting situations susceptible to camera shake" alt="Shooting situations susceptible to camera shake" /></a></td>\n');
	} else {
		document.write('<td width="137"><a href="'+ MenuDirectory +'scene/index.html"><img src="'+ MenuDirectory +'img/tmenu03_over.gif" width="137" height="44" border="0" name="tm3" id="tm3" title="Shooting situations susceptible to camera shake" alt="Shooting situations susceptible to camera shake" /></td>\n');
	}
	if (flg!="03"){
		document.write('<td width="161"><a href="'+ MenuDirectory +'technology/index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm4\',\'\',\''+ MenuDirectory +'img/tmenu04_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu04.gif" width="161" height="44" border="0" name="tm4" id="tm4" title="Canon&#8217;s image stabilizer technology" alt="Canon&#8217;s image stabilizer technology" /></a></td>\n');
	} else {
		document.write('<td width="161"><a href="'+ MenuDirectory +'technology/index.html"><img src="'+ MenuDirectory +'img/tmenu04_over.gif" width="161" height="44" border="0" name="tm4" id="tm4" title="Canon&#8217;s image stabilizer technology" alt="Canon&#8217;s image stabilizer technology" /></a></td>\n');
	}
	if (flg!="04"){
		document.write('<td width="182"><a href="'+ MenuDirectory +'merit/index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm5\',\'\',\''+ MenuDirectory +'img/tmenu05_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu05.gif" width="182" height="44" border="0" name="tm5" id="tm5" title="The benefits of an in-lens image stabilizer design" alt="The benefits of an in-lens image stabilizer design" /></a></td>\n');
	} else {
		document.write('<td width="182"><a href="'+ MenuDirectory +'merit/index.html"><img src="'+ MenuDirectory +'img/tmenu05_over.gif" width="182" height="44" border="0" name="tm5" id="tm5" title="The benefits of an in-lens image stabilizer design" alt="The benefits of an in-lens image stabilizer design" /></a></td>\n');
	}
	if (flg!="05"){
		document.write('<td width="130"><a href="'+ MenuDirectory +'expression/index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm6\',\'\',\''+ MenuDirectory +'img/tmenu06_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu06.gif" width="130" height="44" border="0" name="tm6" id="tm6" title="Canon IS Lens showcase" alt="Canon IS Lens showcase" /></a></td>\n');
	} else {
		document.write('<td width="130"><a href="'+ MenuDirectory +'expression/index.html" onmouseout="swapImgRestore()" onmouseover="swapImage(\'tm6\',\'\',\''+ MenuDirectory +'img/tmenu06_over.gif\',1)"><img src="'+ MenuDirectory +'img/tmenu06_over.gif" width="130" height="44" border="0" name="tm6" id="tm6" title="Canon IS Lens showcase" alt="Canon IS Lens showcase" /></a></td>\n');
	}
	document.write('<td><img src="'+ MenuDirectory +'img/img_sright_bg_01.gif" width="10" height="45" alt="" /></td>\n');
	document.write('</tr>\n');	
	document.write('</table>\n');	
	document.close();
}

// Ends +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
