// JavaScript Document
// Tab Nav Hover

<!--//--><![CDATA[//><!--

//sfHover = function() {
//	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
//	for (var i=0; i<sfEls.length; i++) {
//		sfEls[i].onmouseover=function() {
//			this.className+=" sfhover";
//		}
//		sfEls[i].onmouseout=function() {
//			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
//		}
//	}
//}
//if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>


/********************
 * 
 * Get the Absolute Path based on different URL 
 * By Wenbin
 * 
 ***********************/
var myAbsolutePath = "";

if (Locale == 'CN')
{ 
	var URLHref = window.location.href;
	
	var arrValidPath = new Array();
	arrValidPath.push('www.lsi.cn');
	arrValidPath.push('www.lsi.cn');
	arrValidPath.push('www.lsi.cn');
	arrValidPath.push('cncmqa.lsil.com');

	for (i = 0; i < arrValidPath.length; i++)
	{
		if (URLHref.indexOf(arrValidPath[i]) >= 0)
		{
			myAbsolutePath = 'URLFromChinaSite';
			break;
		}
	}
	
	if (myAbsolutePath != 'URLFromChinaSite') 
		{myAbsolutePath = 'http://www.lsi.cn';}
	else 
		{myAbsolutePath = '';}
}



/********************
 * 
 * End. Get the Absolute Path based on different URL 
 * 
 ***********************/

// style sheet numbers
var tmpcss = document.cookie.search("style=");

var cssCurrent = "";
if (tmpcss == -1) {
	cssCurrent = "";
} else {
	cssCurrent = document.cookie.charAt(document.cookie.search("style=") + 6);
}


var next="";
var showBtns="<a href=\"javascript: document.cookie='style=1'; window.location.reload();\">" + Change_Font_Size_Label.DisplayName(Locale) + "</a>";
if (cssCurrent==""){
    next = "1";
	showBtns="<a href=\"javascript: document.cookie='style=" +next+ "'; window.location.reload();\">" + Change_Font_Size_Label.DisplayName(Locale) + "</a>";
}else if (cssCurrent=="1"){
	next = "2";
	showBtns="<a href=\"javascript: document.cookie='style=" +next+ "'; window.location.reload();\">" + Change_Font_Size_Label.DisplayName(Locale) + "</a>";
}else if (cssCurrent=="2"){
	next = "";
	showBtns="<a href=\"javascript: document.cookie='style=" +next+ "'; window.location.reload();\">" + Change_Font_Size_Label.DisplayName(Locale) + "</a>";
}

var StyleFile = "style" + cssCurrent + ".css";


document.writeln('<link rel="stylesheet" type="text/css" media="screen" href="' + myAbsolutePath + '/global/css/' + StyleFile + '">');
function reloadLink() {document.write(showBtns);}