// JavaScript Document

// section 1
//<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
NS4=(document.layers) ;
NS60=(navigator.userAgent.indexOf("Netscape6/6.0")!=-1);
Opera=(navigator.userAgent.indexOf('Opera')!=-1)||(navigator.appName.indexOf('Opera')!=-1)||(window.opera);
IE4=(document.all&&!Opera) ;
mac=((IE4)&&(navigator.appVersion.indexOf ("Mac")!=-1));
DOM=document.documentElement&&!NS4&&!IE4&&!Opera;
mswnd=(navigator.appVersion.indexOf("Windows")!=-1||navigator.appVersion.indexOf("WinNT")!=-1);

if(IE4)
	{
	av=navigator.appVersion;
	avi=av.indexOf("MSIE");
	if (avi==-1)
		version = parseInt (av) ;
	  else
		version = parseInt(av.substr(avi+4)) ;
	}

// section 2

if(NS4||IE4||DOM||Opera)
	{
	imgFolder = "http://www.irf.com.cn/irfsite/";
	maxlev = 2;
	popAlign = 0;
	bVarWidth = 0;
	bShowDel = 500;
	popupWidth = 160;
	levelOffset = 20;
	bord = 0;
	vertSpace = 1;
	sep = 0;
	sepFrame = false;
	openSameFrame = false;
	cntFrame = "content";
	contentFrame = "content";
	mout = true;
	iconSize = 8;
	closeDelay = 1000;
	tlmOrigBg = "Black";
	tlmOrigCol = "White";
	bBitmapScheme = false;
	popupOpacity = 95;
	bBitmapPopups = false;
	popupOpenHeight = 5;
	popupLeftPad = 5;
	popupRightPad = 2;
	tlmHlBg = "Black";
	tlmHlCol = "#CC0000";
	borderCol = "Black";
	menuHorizontal = true;
	scrollHeight=6;
	}
	
//section 3

lev0 = new Array ("12px",false,false,"White","Black","#CC0000","","Black") ;
lev1 = new Array ("12px",false,false,"White","Black","#CC0000","","Black") ;
lev2 = new Array ("12px",false,false,"White","Black","#CC0000","","Black") ;



mn1 = new Array (
"<!--_blank-->产品目录","http://www.irf.com/search/product_line.html",0
,"<!--_blank-->参数搜索","http://www.irf.com/search/product_line.html",0
,"HEXFET 功率 MOSFETs","/irfsite/dc/hexfet.asp",0
,"<!--_blank-->集成电路","http://www.irf.com/product-info/cic/",0
,"<!--_blank-->栅驱动器IC","http://www.irf.com/product-info/cic/fsgatedriverics.html",0
,"<!--_blank-->G5 HVICs","http://www.irf.com/product-info/hvic/g5hvic.html",0
,"<!--_blank-->IGBT","http://www.irf.com/product-info/igbt/",0
,"芯片产品","/irfsite/die.asp",0
,"宇航产品","/irfsite/hi-rel/",0
);

mn1_8 = new Array (
);

mn2 = new Array (
"<!--_blank-->如何购买","http://ec.irf.com/v6/en/US/adirect/ir?cmd=HowToBuyProducts",0
,"<!--_blank-->存贷供应","http://ec.irf.com/v6/en/US/adirect/ir?cmd=catSearchFrame",1
,"<!--_blank-->搜索替代产品","http://ec.irf.com/v6/en/US/adirect/ir?cmd=NewCrossRef",0
,"<!--_blank-->产品变更通知","http://www.irf.com/technical-info/pcn.html",0
,"<!--_blank-->制造厂","http://www.irf.com/aboutir-info/manufact.htm",0
,"联系 IR 中国","http://www.irf.com.cn/irfsite/lianxi.asp",0
,"IR 中国代理商","http://www.irf.com.cn/irfsite/daili.asp",0
,"目录元件经销商","http://www.irf.com.cn/irfsite/e_agent.asp",0
);

mn2_2 = new Array (
"<!--_blank-->存贷供应","http://ec.irf.com/v6/en/US/adirect/ir?cmd=catSearchFrame",0
,"<!--_blank-->产品供应状态","http://ec.irf.com/v6/en/US/adirect/ir?cmd=catSearchFrame",0
,"<!--_blank-->数据表","http://ec.irf.com/v6/en/US/adirect/ir?cmd=catSearchFrame",0
)

mn3 = new Array (
"应用笔记","http://www.irf.com.cn/irfsite/jishu_app_notes.asp",0
,"技术文章","http://www.irf.com.cn/irfsite/jishu_paper.asp",0
,"Fact Sheets","http://www.irf.com.cn/irfsite/factsheets.asp",0
);


mn4 = new Array (
"<!--_blank-->设计中心","http://www.irf.com/design-center/",0
,"产品应用","",1
,"<!--_blank-->myPower","http://www.irf.com/design-center/mypower/",0
,"参考设计","http://www.irf.com.cn/irfsite/ref_design_datasheet.asp",0
,"<!--_blank-->模型","http://www.irf.com/product-info/models/",0
,"设计指南","http://www.irf.com.cn/irfsite/design_guide.asp",0
,"封装信息","http://www.irf.com.cn/irfsite/package/",0
,"<!--_blank-->无铅产品","http://www.irf.com/ehs/",0
,"<!--_blank-->质量与可靠性报告","http://www.irf.com/product-info/reliability/",0
);

mn4_2 = new Array (
"<!--_blank-->交流--直流  	","http://www.irf.com/product-info/smps/",0
,"<!--_blank-->家电","http://www.irf.com/product-info/appliance/",0
,"<!--_blank-->音响","http://www.irf.com/product-info/audio/",0
,"<!--_blank-->汽车电子","http://www.irf.com/product-info/auto/",0
,"<!--_blank-->直流--直流","http://www.irf.com/product-info/dc-dc/",0
,"<!--_blank-->桌上电脑/服务器","http://www.irf.com/product-info/server/",0
,"<!--_blank-->高可靠性产品","http://www.irf.com/product-info/hi-rel/",0
,"<!--_blank-->照明","http://www.irf.com/product-info/lighting/",0
,"<!--_blank-->电机驱动","http://www.irf.com/product-info/imotion/",0
,"<!--_blank-->网络通信","http://www.irf.com/product-info/netcom/",0
,"<!--_blank-->便携设备产品","http://www.irf.com/product-info/portables/",0
);

absPath="";
if (sepFrame && !openSameFrame)
	{
	if (document.URL.lastIndexOf("\\")>document.URL.lastIndexOf("/")) {sepCh = "\\" ;} else {sepCh = "/" ;}
	absPath = document.URL.substring(0,document.URL.lastIndexOf(sepCh)+1);
	}
popupOffset = 4;
if(Opera) document.write("<"+"script language='JavaScript1.2' src='http://www.irf.com/js/menu_opera.js'><"+"/"+"script>");
else if (NS4) document.write("<"+"script language='JavaScript1.2' src='http://www.irf.com/js/menu_ns4.js'><"+"/"+"script>");
else if (document.getElementById) document.write("<"+"script language='JavaScript1.2' src='http://www.irf.com/js/menu_dom.js'><"+"/"+"script>");
else document.write("<"+"script language='JavaScript1.2' src='http://www.irf.com/js/menu_ie4.js'><"+"/"+"script>");
document.write("<style type='text/css'>\n");
document.write(".CL0 {text-decoration:none;color:White; }\n");
if(!IE4&&!DOM) document.write(".topFold {position:relative}\n");
document.write(((NS4&&!bBitmapScheme)?".mm2":".mit")+" {padding-left:0px;padding-right:0px;}\n");
document.write("</style>\n");

//section rollover

 function movepic(img_name,img_src) {
 document[img_name].src=img_src;
 }
 
 // search_form
 
 	String.prototype.trim = function()
  	{
  	  return( this.replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1') );
	}

function CheckInput()
{
	var f = document.SearchForm;
	if ( f.q.value.length == 0 || f.q.value.trim().length == 0 )
	{
		alert("Please enter a search word!");
		f.q.focus();
		return;
	}
	if ( f.SearchMethod ) // ir part search
	{
		document.location.href = "http://ec.irf.com/v6/en/US/adirect/ir?cmd=catSearchFrame&domSendTo=byID&domProductQueryName=" + f.q.value.trim();

	}

	return;
}


/* // action for search with 2 radio bullet buttons
function CheckInput()
{
	var f = document.SearchForm;
	if ( f.q.value.length == 0 || f.q.value.trim().length == 0 )
	{
		alert("Please enter a search word!");
		f.q.focus();
		return;
	}
	if ( f.SearchMethod[0].checked ) // ir part search
	{
		document.location.href = "http://ec.irf.com/v6/en/US/adirect/ir?cmd=catSearchFrame&domSendTo=byID&domProductQueryName=" + f.q.value.trim();

	}
	else    // google search
	{
		document.location.href ="http://search.irf.com/search?&btnG=Search+IRF.COM&site=IRF_search&client=IRF_search&proxystylesheet=IRF_search&output=xml_no_dtd&q=" + f.q.value.trim();
	}
	return;
}
*/