// JavaScript Document
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_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_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];}
}



function writeMenu()
{	
	var menuHTML = '';
	
	menuHTML = '<ilayer width=626 height=1 name="dep1" >\n';
	menuHTML += '<layer name="dep2" width=626 height=20>\n';
	menuHTML += '</layer>\n';
	menuHTML += '</ilayer>\n';
	menuHTML += '<div id="describe" style=";width:626PX;height:20px" onMouseover="clear_delayhide()" onMouseout="resetit(event)"></div>\n';
	
	document.write(menuHTML);
}

function writeHead(title)
{	

	var headerHTML = '';
	if (title == null) title = '';
	
	headerHTML = '<title>';
	headerHTML += website_title +' --- ' + title + '</title>\n';
	headerHTML += '<meta http-equiv="Content-Type" content="text/html; charset=big5">\n';
	headerHTML += '<link href="common/e-style.css" rel="stylesheet" type="text/css">\n';

	document.write(headerHTML);

}	// writeHead



function writeHeader()
{
	var headHTML = '';
			
	headHTML = '<table width="636" border="0" cellspacing="0" cellpadding="0">\n';
	headHTML += '		<tr> \n';
	headHTML += '			<td colspan="6" ><a href="e-index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image11\',\'\',\'images/space.gif\',1);showit(2);"  target="_top"><img src="images/space.gif" name="Image11" width="635" height="2" border="0"></a></td>\n';
	headHTML += '		</tr>\n';
	headHTML += '		<tr> \n';
	headHTML += '			<td><a href=e-index.html><img src="images/net_button_left.gif" width="106" height="37" border="0"></a></td>\n';	
	headHTML += '			<td><a href="e-aboutus.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image7\',\'\',\'images/net_button_aboutus_on.gif\',1);showit(2);"><img src="images/net_button_aboutus_off.gif" name="Image7" width="105" height="37" border="0"></a></td>\n';
	headHTML += '			<td><a href="e-portfolio.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image8\',\'\',\'images/net_button_portfolio_on.gif\',1);showit(0);""><img src="images/net_button_portfolio_off.gif" name="Image8" width="105" height="37" border="0"></a></td>\n';
	headHTML += '			<td><a href="e-production.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image9\',\'\',\'images/net_button_production_on.gif\',1);showit(1);""><img src="images/net_button_production_off.gif" name="Image9" width="105" height="37" border="0"></a></td>\n';
	headHTML += '			<td><a href="e-contactus.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image10\',\'\',\'images/net_button_contactus_on.gif\',1);showit(2);""><img src="images/net_button_contactus_off.gif" name="Image10" width="125" height="37" border="0"></a></td>\n';
	headHTML += '			<td><img src="images/net_button_right.gif" width="90" height="37" border="0"></td>\n';
	headHTML += '		</tr>\n';
	headHTML += '	</table>\n';

	
	
	document.write(headHTML);
}

function writeTopCatName()
{
	var catName = '';
	
	catName = '	<tr> \n';
	catName += '	  <td class=topic>'+thisTitle+'</td>\n';
	

	
	document.write(catName);
	
}	// writeTopCatName




function writeFooter()
{	

	var baseHTML = '';
	
	baseHTML = '\n<!-- base start -->\n';
	baseHTML += '<table width="636" border="0" cellspacing="0" cellpadding="0">\n';
	baseHTML += '<tr>\n';
	baseHTML += '	<td><img src="../images/space.gif" width="1" height="10"></td>\n';
	baseHTML += '  </tr>\n';
	baseHTML += '  <tr>\n';
	baseHTML += '	<td class=footer>Copyright (C) 2006. All rights reserved. </td>\n';
	baseHTML += '  </tr>\n';
	baseHTML += '</table>\n';
	

	document.write(baseHTML);
	//alert(baseHTML);
}	// writeHead


function writelan()
{	

	var lanHTML = '';
	
	lanHTML = '\n<!-- lan start -->\n';
	lanHTML += '<table width="74" border="0" cellspacing="0" cellpadding="0">\n';
	lanHTML += '<tr>\n';
	lanHTML += '	<td><a href="e-index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image21\',\'\',\'images/net_button_eng_off.gif\',1)"><img src="images/net_button_eng_on.gif" name="Image21" width="38" height="15" border="0"></a></td>\n';
		lanHTML += '	<td><img src="images/net_button_space.gif" width="5" height="15" border="0"></td>\n';
	lanHTML += '	<td><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image22\',\'\',\'images/net_button_chi_off.gif\',1)"><img src="images/net_button_chi_on.gif" name="Image22" width="31" height="15" border="0"></a></td>\n';
	lanHTML += '  </tr>\n';
	lanHTML += '</table>\n';
	

	document.write(lanHTML);
	//alert(lanHTML);
}	// writeHead
