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];}
}


function FrameSizeChange()
{
	if(	parent.pan.Fsb.value == "<")
	{
		window.parent.fs.cols = "0,*";
		parent.pan.Fsb.value = ">";
	}
	else
	{
			window.parent.fs.cols = "280,*";
			parent.pan.Fsb.value = "<";
	}

}


function navi_OnClickPdfbtn()
{
	var spdf = GetPdfFile(false);

//20080917refine
	//var nwin = window.open(spdf,"_blank","");
	var swidth;
	var sheight;

	swidth=screen.width-20;
	sheight=screen.height-50;

	var nwin = window.open(spdf,"_blank" , "top=20,left=20,width=swidth,height=sheight");

	//nwin.moveTo(20,20);
	//nwin.resizeTo(screen.width-20,screen.height-50);
	//nwin.focus();
//20080917refine

}


function navi_OutPutMenu()
{
	var Url = parent.location.href;

	var CompLoca = new Array('../../index.html','fig.html\?j\=1','fig.html\?j\=2','fig.html\?j\=6','search.html');
	var Location = new Array('../../index.html','category.html\?j\=1','category.html\?j\=2','category.html\?j\=6','search.html');

	var Altindex1      = new Array
								(
									gHeader_Top,
									gHeader_CircuitDiagram,
									gHeader_HarnessLayout,
									gHeader_PowerSource_Grounding_SneakPath1,
									gHeader_Connector
								);
	var Altindex2      = new Array
								(
									gHeader_Top,
									gHeader_CircuitDiagram,
									gHeader_HarnessLayout,
									gHeader_PowerSource_Grounding_SneakPath2,
									gHeader_Connector
								);
	var Altindex="";

	var JcMode= gDefine_JunctionMode;
	if(JcMode == "Y")
	{
		vhm_poeama_button = "hm_poeama_button_p.gif";
		vhm_over_poeama_button = "hm_over_poeama_button_p.gif";
		vhm_bottom_poeama_button = "hm_bottom_poeama_button_p.gif";
		Altindex = Altindex1;
	}
	else
	{
		vhm_poeama_button = "hm_poeama_button_poeama.gif";
		vhm_over_poeama_button = "hm_over_poeama_button_poeama.gif";
		vhm_bottom_poeama_button = "hm_bottom_poeama_button_poeama.gif";
		Altindex = Altindex2;
	}

	var ImgIndex = new Array('top_return.gif','hm_circuit_button.gif','hm_harness_button.gif',vhm_poeama_button,'hm_search_button.gif');

	var OverImgIndex = new Array('over_top_return.gif','hm_over_circuit_button.gif','hm_over_harness_button.gif',vhm_over_poeama_button,'hm_over_search_button.gif');

	var BottomImgIndex = new Array('buttom_top_return.gif','hm_bottom_circuit_button.gif','hm_bottom_harness_button.gif',vhm_bottom_poeama_button,'hm_bottom_search_button.gif');

	var ImgWidthIndex = new Array('100','100','100','165','100');
	var WinIndex = new Array('winfiggrp0','winfiggrp1','winfiggrp2','winfiggrp6','winfiggrp4');

	var Comp     = '';
	var ImgPath  = "../../common/image/button/header/";
	var Table    = "";
	var TdS      = "<td width=\"100\">";
	var AS       = "<a href=\"javascript:";
	var AWO_1    = "FigData_ConnInfoLinkClick(\'";
	var AWO_2    = "','";

	var AWO_3    = "')\; MM_swapImage(\'Image";

	var AWO_4      = "\',\'\',\'";
	var AWO_5      = "\',1)\;";

	var A_1      = "\" onMouseOver=\"MM_swapImage(\'Image";
	var A_2      = "\',\'\',\'";
	var A_3      = "\',1)\" onMouseOut=\"MM_swapImgRestore()\">";
	var ImgS     = "<img src=\"";
	var Img_1    = "\" alt=\"";
	var Img_2    = "\" name=\"Image";
	var Img_3    = "\" height=\"25\" border=\"0\" id=\"Image";
	var Img_4    = "\">";
	var AE       = "</a>";
	var TdE      = "</td>";
	var td1      = "<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>";

	var Tag1 = '<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>';
	var Tag2 = '<td background=\"../../common/image/other/hm_back.gif\"><img src=\"../../common/image/other/space.gif\" width=\"1\" height=\"1\"></td></tr></table></td></tr></table>';

	var path=parent.location.href; 
	var File=path.substring(path.lastIndexOf('/',path.length)+1,path.length);

	File = File.replace(/\&(.*)/,"");

	i = 0 ;

		if(File.match(/fig\.html/))
		{

			Comp = CompLoca[i];
			
			if(File != Comp)
			{
				Table += TdS+AS+AWO_1+WinIndex[i]+AWO_2+Location[i]+AWO_3+(i+1)+AWO_4+ImgPath+BottomImgIndex[i]+AWO_5+A_1+(i+1)+A_2+ImgPath+OverImgIndex[i]+A_3+ImgS+ImgPath+ImgIndex[i]+Img_1+Altindex[i]+Img_2+(i+1)+ImgWidthIndex[i]+Img_3+(i+1)+Img_4+AE+TdE+td1;
			}
			else
			{
				Table += TdS+AS+AWO_1+WinIndex[i]+AWO_2+Location[i]+AWO_3+(i+1)+AWO_4+ImgPath+BottomImgIndex[i]+AWO_5+A_1+(i+1)+A_2+ImgPath+OverImgIndex[i]+A_3+ImgS+ImgPath+ImgIndex[i]+Img_1+Altindex[i]+Img_2+(i+1)+ImgWidthIndex[i]+Img_3+(i+1)+Img_4+AE+TdE+td1;
			}

		}
		else
		{
			Comp = Location[i];

			if(File != Comp)
			{
				Table += TdS+AS+AWO_1+WinIndex[i]+AWO_2+Location[i]+AWO_3+(i+1)+AWO_4+ImgPath+BottomImgIndex[i]+AWO_5+A_1+(i+1)+A_2+ImgPath+OverImgIndex[i]+A_3+ImgS+ImgPath+ImgIndex[i]+Img_1+Altindex[i]+Img_2+(i+1)+ImgWidthIndex[i]+Img_3+(i+1)+Img_4+AE+TdE+td1;
			}
			else
			{
				Table += TdS+AS+AWO_1+WinIndex[i]+AWO_2+Location[i]+AWO_3+(i+1)+AWO_4+ImgPath+BottomImgIndex[i]+AWO_5+A_1+(i+1)+A_2+ImgPath+OverImgIndex[i]+A_3+ImgS+ImgPath+ImgIndex[i]+Img_1+Altindex[i]+Img_2+(i+1)+ImgWidthIndex[i]+Img_3+(i+1)+Img_4+AE+TdE+td1;
			}
		}

	var OutHtml = Tag1 + Table + Tag2 ;

	parent.header.document.all("head").innerHTML = OutHtml;
}


function navi_OutPutFigMenu()
{
	var sZoomOut = gFooter_ZoomOut;
	var sZoomFit = gFooter_ZoomFit;
	var sZoomIn = gFooter_ZoomIn;
	var sZoomAll = gFooter_ZoomAll;
	var sPrint = gFooter_Print;


	var sTop = gHeader_Top;//TOP

	OutHtml = '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>'
				+'<td width=\"60\"><a href=\"javascript:SVG_FigReduction(\'navi\')\; MM_swapImage(\'Image9\',\'\',\'../../common/image/button/footer_r/bottom_zoomout.gif\',1)\;" onMouseOver=\"MM_swapImage(\'Image9\',\'\',\'../../common/image/button/footer_r/over_zoomout.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/zoomout.gif\" alt=\"'

				+sZoomOut

				+'\" name=\"Image9\" width=\"60\" height=\"25\" border=\"0\" id=\"Image9\"></a></td>'

        		+'<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>'
				+'<td width=\"60\"><a href=\"javascript:SVG_Figfitness(\'navi\')\; MM_swapImage(\'Image11\',\'\',\'../../common/image/button/footer_r/bottom_zoomfit.gif\',1)\;" onMouseOver=\"MM_swapImage(\'Image11\',\'\',\'../../common/image/button/footer_r/over_zoomfit.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/zoomfit.gif\" alt=\"'

				+sZoomFit

				+'\" name=\"Image11\" width=\"60\" height=\"25\" border=\"0\" id=\"Image11\"></a></td>'

        		+'<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>'
				+'<td width=\"60\"><a href=\"javascript:SVG_FigExpansion(\'navi\')\; MM_swapImage(\'Image8\',\'\',\'../../common/image/button/footer_r/bottom_zoomin.gif\',1)\;\" onMouseOver=\"MM_swapImage(\'Image8\',\'\',\'../../common/image/button/footer_r/over_zoomin.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/zoomin.gif\" alt=\"'

				+sZoomIn

				+'\" name=\"Image8\" width=\"60\" height=\"25\" border=\"0\" id=\"Image8\"></a></td>'
        		+'<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>'
				+'<td width=\"60\"><a href=\"javascript:SVG_FigSizeAll(\'navi\')\; MM_swapImage(\'Image10\',\'\',\'../../common/image/button/footer_r/bottom_zoomall.gif\',1)\;\" onMouseOver=\"MM_swapImage(\'Image10\',\'\',\'../../common/image/button/footer_r/over_zoomall.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/zoomall.gif\" alt=\"'

				+sZoomAll

				+'\" name=\"Image10\" width=\"60\" height=\"25\" border=\"0\" id=\"Image10\"></a></td>'

        		+'<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>'
        		+'<td width=\"90\" background=\"../../common/image/other/hm_back.gif\"><img src=\"../../common/image/other/space.gif\" width=\"90\" height=\"1\"></td>'
        		+'<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>'
        		+'<td width=\"60\"><a href=\"javascript:navi_OnClickPdfbtn()\; MM_swapImage(\'Image12\',\'\',\'../../common/image/button/footer_r/bottom_print.gif\',1)\;\" onMouseOver=\"MM_swapImage(\'Image12\',\'\',\'../../common/image/button/footer_r/over_print.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/print.gif\" alt=\"'

				+sPrint

				+'\" name=\"Image12\" width=\"60\" height=\"25\" border=\"0\" id=\"Image12\"></a></td>'

        		+'<td width=\"1\"><img src=\"../../common/image/other/hm_line.gif\" width=\"1\" height=\"25\"></td>'
        		+'<td width=\"60\"><a href=\"javascript:FigData_ConnInfoLinkClick(\'winfiggrp0\',\'../../index.html\')\; MM_swapImage(\'Image13\',\'\',\'../../common/image/button/footer_r/buttom_top_return.gif\',1)\;\" onMouseOver=\"MM_swapImage(\'Image13\',\'\',\'../../common/image/button/footer_r/over_top_return.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/top_return.gif\" alt=\"'

				+sTop

				+'\" name=\"Image13\" width=\"60\" height=\"25\" border=\"0\" id=\"Image13\"></a></td>'

       			+'<td width=\"200\" background=\"../../common/image/other/hm_back.gif\"><img src=\"../../common/image/other/space.gif\" width=\"90\" height=\"1\"></td>'

        		+'<td background=\"../../common/image/other/hm_back.gif\"><img src=\"../../common/image/other/space.gif\"></td>'
      			+'</tr></table>';

	parent.navi.document.all("FigMenu").innerHTML = OutHtml;
}


function navi_OutPutFigMenu2()
{
	var sTop = gHeader_Top;//TOP

	OutHtml = '<table width=\"100%\" style=\"border-style:none\; border-top-style:solid\;border-width:1px 0px 0px 0px\; border-color:#cccccc\; cellspacing=\"0\" cellpadding=\"0\"><tr>'

        		+'<td width=\"681\" background=\"../../common/image/other/hm_back.gif\"><img src=\"../../common/image/other/space.gif\" width=\"90\" height=\"1\"></td>'

        		+'<td width=\"60\"><a href=\"javascript:FigData_ConnInfoLinkClick(\'winfiggrp0\',\'../../index.html\')\; MM_swapImage(\'Image20\',\'\',\'../../common/image/button/footer_r/buttom_top_return.gif\',1)\;\" onMouseOver=\"MM_swapImage(\'Image20\',\'\',\'../../common/image/button/footer_r/over_top_return.gif\',1)\" onMouseOut=\"MM_swapImgRestore()\"><img src=\"../../common/image/button/footer_r/top_return.gif\" alt=\"'

+sTop+

'\" name=\"Image20\" width=\"60\" height=\"25\" border=\"0\" id=\"Image20\"></a></td>'

        		+'<td background=\"../../common/image/other/hm_back.gif\"><img src=\"../../common/image/other/space.gif\"></td>'
      			+'</tr></table>';

	parent.header.document.all("head").innerHTML = OutHtml;
}
