//Lexus javascript menu v1.0.1
//Specific version for lexus v5 sites only.
var theTree, allText='',sitePath='/',NSfirst=0;
var pageName, pageRefer, xrepainted=false,countryselector='',countryDisplayed=false,onHomePage=false,navwidth=138;
// GUI
var menuGUI=new Array()
var modelmenuGUI=new Array()
// Global GUI veariables not loaded in Netscape 4.  Requires initMenu. 
function initValues() {
	if (checkJsMenu())
	{
	pageRefer='';
	xrepainted=false
	countryselector=gss(menuAttributes, 'countryselector=',';;;');
	showroom=gss(menuAttributes, 'showroom=',';;;');
	tmc=gss(menuAttributes, 'tmc=',';;;');
	countryDisplayed=onHomePage;
	if (countryselector=='N') countryselector='';
	if (showroom=='N') showroom='';	
	if (tmc=='N') tmc='';	
	}	
}
	pageName=getPath(location.href)
	if(pageName.indexOf('.')==-1) pageName+='index.html'
function initMenu(){
menuGUI=new Array(
'', 
'::<tr><td height="16" id="x$DIV"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>::<tr><td height="16" class="navtoolsselected" id="x$DIV"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>$CHILDREN:: :: ::', 
'::<tr><td height="16" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="10"><img src="/media/global/styles/images/spacer.gif" width="10" height="1" alt="" border="0" /></td><td width="120" height="16" ><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>::<tr><td height="16" class="navtoolsselected" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="10"><img src="/media/global/styles/images/spacer.gif" width="10" height="1" alt="" border="0" /></td><td width="120" height="16"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>$CHILDREN:: :: ::', 
'::<tr><td height="16" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="20"><img src="/media/global/styles/images/spacer.gif" width="20" height="1" alt="" border="0" /></td><td width="120" height="16" ><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>::<tr><td height="16" class="navtoolsselected" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="20"><img src="/media/global/styles/images/spacer.gif" width="20" height="1" alt="" border="0" /></td><td width="120" height="16"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>$CHILDREN:: :: ::')
modelmenuGUI=new Array(
'', '',
'::<tr><td height="16" class="navtools" id="x$DIV"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>::<tr><td height="16" class="navtoolsselected" id="x$DIV">$LABEL</td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>$CHILDREN:: ::<tr><td height="17" id="x$DIV">&nbsp;</td></tr>::', 
'::<tr><td height="16" class="navtools" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="10"><img src="/media/global/styles/images/spacer.gif" width="10" height="1" alt="" border="0" /></td><td width="120" height="16"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>::<tr><td height="16" class="navtoolsselected" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="10"><img src="/media/global/styles/images/spacer.gif" width="10" height="1" alt="" border="0" /></td><td width="120" height="16" >$LABEL</td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>$CHILDREN:: :: ::', 
'::<tr><td height="16" class="navtools" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="20"><img src="/media/global/styles/images/spacer.gif" width="20" height="1" alt="" border="0" /></td><td width="120" height="16"><a href="$LINK" $TARGET  onmouseover="ShowBar(\'x$DIV\');" onmouseout="HideBar(\'x$DIV\');">$LABEL</a></td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>::<tr><td height="16" class="navtoolsselected" id="x$DIV"><table border="0" cellspacing="0" cellpadding="0" width="138"><tr><td width="20"><img src="/media/global/styles/images/spacer.gif" width="20" height="1" alt="" border="0" /></td><td width="120" height="16">$LABEL</td></tr></table></td></tr><tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>$CHILDREN:: :: ::')
}
function doResize(evnt){location.reload(true)}
function TreeItem(a) {this.attributes=a;this.children=new Array()}
function Tree(a) {
	if (pageName==null) initValues()
	var o,i,v,par,id,vc,ac,tmp,ss, s1,parentPage,vv
	this.items=new Array(); this.activeCandidates=new Array(); this.getTree=_getTree; this.refer=null
		o=this.items; ac=this.activeCandidates
	o['ROOT']=new TreeItem('ROOT', '')
	s1=pageName.split('.');ss=s1[0].split('_');--ss.length;parentPage=ss.join('_')+'.'+s1[1]
	for (i=0; i<a.length; i++) {
		v=a[i].split('|');id=v[2];par=v[3];vc=this.items[par].children
		vc[vc.length]=id;this.items[id]=new TreeItem(v)
		vv=v[5]
		mypageName=pageName;
		vv=(rs(vv,' ',''))
		if (vv.toLowerCase()==mypageName) ac[ac.length]=id
		if (pageRefer!='' && vv==pageRefer) this.refer=id
		if (vv==parentPage) this.parentPageItem=id
	}
	this.activeItem=getActiveItem(this)
	if (this.activeItem==null) {
		if (this.parentPageItem==null) return
		this.activeItem=this.parentPageItem
	}
	vc=o[this.activeItem];i=0
	while (vc && i<20) {
		id=vc.attributes[2];par=vc.attributes[3];vc.active=true;i++
		if (par>'') {
			vc=o[par]
			if (vc!=null) vc.activeItem=id
		}
		else vc=null
	}
}
function _getTree(start, count, gui, par, curItem, curLevel) {
	var o, tmp, v, lo, parent, expandAll, active, v1, tmp1
	o=this.items[curItem?curItem:'ROOT']
	start=(start==null)?0:start
	count=(count==null)?99:count
	curLevel=curLevel?curLevel:0
	par=par?par:''
	expandAll=(par.indexOf('expand=all')>-1)?true:false
	active=(typeof o.activeItem=='undefined')?false:true
	if (start>0) return (active==false)?'':this.getTree(start-1, count, gui, par, o.activeItem, curLevel+1)
	gui=gui?gui:new Array('<ul>::<li><a href="javascript:testNav(\'$LINK\')">$LABEL</a></li>$CHILDREN::<li><b><a href="javascript:testNav(\'$LINK\')">$LABEL</a></b></li>$CHILDREN::</ul>')
	//gui=new Array('<ul>::<li><a href="javascript:testNav(\'$LINK\')">$LABEL</a></li>$CHILDREN::<li><b><a href="javascript:testNav(\'$LINK\')">$LABEL</a></b></li>$CHILDREN::</ul>')
	lo=((curLevel<gui.length)?gui[curLevel]:gui[gui.length-1]).split('::')
	if (o.attributes[8]=='1' && expandAll==false && active==false) return ''
	if (o.activeItem && this.items[o.activeItem].attributes[7]=='1' && par.indexOf('expand=all')==-1){
		tmp=lo[0]
		v=this.items[o.activeItem]
		tmp1=''
		if (v.attributes[9]!='1') tmp1=getItemHTML(v,gui,curLevel,this)
		if (v.children.length>0 && count>0 && needsChildren(par, o, v)) tmp1=rs(tmp1, '$CHILDREN', this.getTree(start, count-1, gui, par, o.activeItem, curLevel+1))
		else tmp1=rs(tmp1, '$CHILDREN', '')
		for (var j=0; j<v.children.length; j++)	{
			v1=this.items[v.children[j]]
			if (v1.attributes[9]=='1') tmp1+=getItemHTML(v1, gui, curLevel,this)
		}
		tmp+=tmp1
		if (tmp==lo[0]) return ''
		else return tmp+lo[3]
	}
	tmp=lo[0]
	for (var i=0; i<o.children.length; i++) {
		v=this.items[o.children[i]]
		if (v.attributes[9]!='1') tmp1=getItemHTML(v,gui,curLevel,this)
		else tmp1=''
		if (v.children.length>0 && count>0 && needsChildren(par, o, v)) tmp1=rs(tmp1, '$CHILDREN', this.getTree(start, count-1, gui, par, o.children[i], curLevel+1))
		else tmp1=rs(tmp1, '$CHILDREN', '')
		tmp+=tmp1
		for (var j=0; j<v.children.length; j++)	{
			v1=this.items[v.children[j]]
			if (v1.attributes[9]=='1') tmp1+=getItemHTML(v1, gui, curLevel,this)
		}
	}
	if (tmp==lo[0]) return ''
	else return tmp+lo[3]
}
function getActiveItem(a) {
	var ac=a.activeCandidates,o=a.items,vc,i,ax, tp
	if (ac.length==2 && pageName.indexOf('kce')==-1) return ac[1]
	if (ac.length==1) return ac[0]
	if (ac.length==0 && a.refer!=null) return a.refer
	if (a.refer==null) return ac[0]
	vc=o[a.refer];i=0
	while (vc && i<20) {
		id=vc.attributes[2];par=vc.attributes[3];vc.active=true;i++
		if (par>'') {
			vc=o[par]
			if (vc!=null) vc.activeItem=id;
		}
		else vc=null
	}
	ax=a.getTree(null,null,new Array('::$LINK||$ID\n::$LINK||$ID\n$CHILDREN::'))
	vc=o[a.refer];i=0
	while (vc && i<20) {
		id=vc.attributes[2];par=vc.attributes[3];vc.active=false;i++
		if (par>'') {
			vc=o[par]
			if (vc!=null) vc.activeItem=null
		}
		else vc=null
	}
	var ax1=(ax.indexOf(sitePath+pageName+"||"))?ax.substr(ax.lastIndexOf(sitePath+pageName+"||")):ax
	tp=gss(ax1, sitePath+pageName+'||', '\n')
	return (tp=='')?a.refer:tp
}
function needsChildren(def, parent, o) {
	if (def.indexOf('expand=all')>-1) return true
	if (parent.activeItem && parent.activeItem==o.attributes[2]) return true
	return false
}
function getItemHTML(o, gui, curLevel, a, b) {
	var tmp='', lo=((curLevel<gui.length)?gui[curLevel]:gui[gui.length-1]).split('::'), loi
	if (o.active) {
		if (o.activeItem && a.items[o.activeItem].attributes[9]=='1') loi=lo[1]
		else loi=lo[2]
	}
	else loi=lo[1]
	if (o.attributes[4]=='') return ''
	if (o.attributes[5]=='' && lo.length>3) loi=lo[4]
	return replaceValues(loi, o, b,curLevel)
}
function replaceValues(a, b, c,d) {
	var v=a, lnk=b.attributes[5], trg=b.attributes[6]
	ll=b.attributes[4]
	v=rs(v, "$LABEL", ll)
	rExp = /\'/gi;
	ll = ll.replace(rExp, "")
	v=rs(v, "$DIV", ll)
	newlnk=((lnk.indexOf('http://')==0 || lnk.toLowerCase().indexOf('javascript')==0)?'':sitePath)+lnk
	opt=b.attributes[10]
	if (opt.indexOf("popup=")==0)
	{
		newlnk=lnk;
		G_day = new Date();
 		G_seed = G_day.getTime();
 		iRand = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*100000 + 1,10);
		max=(opt.indexOf(";;;")>0)?opt.indexOf(";;;"):opt.length;
		opt=opt.substr(6,max-6)
		var o=opt.split(',');
		w=(o[0]!=null)?o[0]:200;
		h=(o[1]!=null)?o[1]:200;
		n=(o[2]!=null)?o[2]:iRand;
		s=(o[3]!=null)?o[3]:'yes';
 		winleft = (screen.width - w) / 2;
 		winUp = (screen.height - h) / 2;
		t=(o[4]!=null)?o[4]:winUp;
		l=(o[5]!=null)?o[5]:winleft;
		newlnk="javascript:window.open(\'"+newlnk+"\',\'"+n+"\',\'scrollbars="+s+",width="+w+",height="+h+",left="+l+",top="+t+"\');void null;";
	}
	v=rs(v, "$LINK", newlnk)
	v=rs(v, "$TARGET", (trg=='')?'':' target="'+trg+'"')
	v=rs(v, "$ID", b.attributes[2])
	if (opt.indexOf("visible=N")!=-1) v='';
	return v
}
function getPath(a) {if (sitePath!='/') {return grs((a+'').toLowerCase(), sitePath)} else {return grs((a+'').toLowerCase(), location.host+sitePath)}}
function lds(a) {allText+=a+'\n'}
function ds(a) {document.writeln(a)}
function rs(a, b, c) {return (a!=null && a!="")?a.split(b).join(c):''}
function grs(a,b) {var o=a.split(b);if(o.length>1) return o[1]; else return ''}
function gss(a,b,c) {var o=a.split(b);if (o.length>1) return (o[1]+c).split(c)[0];else return ''}
function showBottomnav()
{
	if (checkJsMenu())
	{
	var v, o, i;
	v='<table border="0" cellspacing="0" cellpadding="0" width="610">';
	v+='<tr>';
	o=jsMenu;
	nb=0;
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("insitemap=N")!=-1 && oo[10].indexOf("bottomnav=Y")!=-1) 
		{
			if (oo[5].indexOf('javascript')!=-1 || oo[5].indexOf('#top')!=-1) {thepath=oo[5];}else{thepath=sitePath+oo[5];}
			v+='<td class="navfooter"><a href="'+thepath+'">'+oo[4]+'</a></td>';
		}
	}
	v+='</tr>';
	v+='<tr><td height="15"></td></tr>'
	v+='</table>';
	ds(v);
	}
}
function showTopnav()
{
	if (checkJsMenu())
	{
	var v, o, i;
	v='<table border="0" cellspacing="0" cellpadding="0" width="100%">';
	o=jsMenu;
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("insitemap=N")!=-1 && oo[10].indexOf("topnav=Y")!=-1) 
		{
		if (i!=0) v+='<tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
		//added direct http link shiroki
		if (oo[5].indexOf('javascript')!=-1 || oo[5].indexOf('#top')!=-1 || oo[5].indexOf('http://')!=-1) {thepath=oo[5];}else{thepath=sitePath+oo[5];}
		v+='<tr><td width="100%" height="16" class="navshortcut"><a href="'+thepath+'" target="'+oo[6]+'">'+oo[4]+'</a></td></tr>'
		}
	}
	v+='</table>';
	ds(v);
	}
}
function showModelnav() 
{
	if (checkJsMenu())
	{
	var v, o, i, mwone, mwtwo;
	o=jsMenu;
	//pageName=getPath(location.href)	
	v='<table border="0" cellspacing="0" cellpadding="0" width="610" class="modelbar">'
	v+='<tr>'
	v+='<th width="15" height="1"><img src="img/spacer.gif" width="15" height="1" alt="" border="0" /></th>'
	// headers for 7 models originally 25 + 60 = 85 x 7 shiroki
		for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='1' && oo[10].indexOf("modelnav=Y")!=-1) 
		{
	mwone=10;
	mwtwo=10;
	v+='<th width="'+mwone+'"><img src="img/spacer.gif" width="'+mwone+'" height="1" alt="" border="0" /></th>'
	v+='<th width="'+mwtwo+'"><img src="img/spacer.gif" width="'+mwtwo+'" height="1" alt="" border="0" /></th>'
		}
	}
	v+='</tr>'
	v+='<tr>'
	v+='<td height="16"><img src="img/spacer.gif" width="1" height="16" alt="" border="0" /></td>'
//	o=jsMenu;
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='1' && oo[10].indexOf("modelnav=Y")!=-1) 
		{
		 fold=pageName.substr(0,pageName.indexOf('/'))
		 if ('/'+fold+'/index.html'==sitePath+oo[5]) 
		 {v+='<td class="navmodels">'+oo[4]+'</td>'}
		 else 
		 {
			v+='<td class="navmodels"><a href="'+sitePath+oo[5]+'" onfocus="this.blur();" id="N'+i+'">'+oo[4]+'</a></td>';}
			v+='<td><img src="img/spacer.gif" width="1" height="1" alt="" border="0" /></td>'
		}
	}
	v+='</tr></table>';
	onHomePage=(pageName=='' || pageName=='index.html')?true:false;
	/* TMC don't need this block	if (onHomePage)
	{
			navwidth=149;
			v+='<table border="0" cellspacing="0" cellpadding="0" class="modelbar" width="100%">'
			v+='	<tr>'
			for (i=0; i<o.length; i++) {
				oo=o[i].split('|')
				if (oo[0]=='1' && oo[10].indexOf("modelnav=Y")!=-1) 
				{
					fold=oo[5].substr(0,oo[5].indexOf('/'))
					v+='<td width="10" height="50"><img src="/media/global/styles/images/spacer.gif" width="10" height="1" alt="" border="0" /></td>'
					v+='<td width="110"><a href="'+sitePath+oo[5]+'" onmouseover="ModelOver(\'N'+i+'\');" onmouseout="ModelOut(\'N'+i+'\');" onfocus="this.blur();"><img src="/menu/images/'+oo[13]+'" width="110" height="50" alt="" border="0" /></a></td>'
				}
			}
			v+='	</tr>'
			v+='</table>'
	}	*/
	ds(v);
	}	
}
function showToolsnavold()  //old one do not use
{
	if (checkJsMenu())
	{
	initValues();
	var v, o, i;
	v='';
	//pageName=getPath(location.href)	
	if (countryselector!='') 
	{
		onHomePage=(pageName=='' || pageName=='index.html')?true:false;
		if (onHomePage)
		{
			v+='<table border="0" cellspacing="0" cellpadding="0" width="100%">'
			v+='<tr><td width="149" height="1"><img src="/media/global/styles/images/spacer.gif" width="145" height="1" alt="" border="0" /></td><td width="100%"></td></tr>'
			v+='<tr><td rowspan="3"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="149" height="202">'
			v+='	<param name="movie" value="/media/global/flash/lex_50_map.swf" />'
			v+='	<param name="quality" value="high" />'
			v+='	<param name="bgcolor" value="#ffffff" />'
			v+='	<param name="menu" value="false" />'
			v+='	<embed src="/media/global/flash/lex_50_map.swf" menu="false" quality="high" bgcolor="#ffffff" width="149" height="202" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></td><td height="16">'
			v+='</td></tr>'
			v+='<tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>'
			v+='<tr><td height="185"></td></tr>'
			v+='<tr><td height="16" colspan="2"></td></tr>'
			v+='</table>'
		}
	}
	v+='<table border="0" cellspacing="0" cellpadding="0" width="100%">';
	v+='<tr><td width="'+navwidth+'" height="1"><img src="/media/global/styles/images/spacer.gif" width="'+navwidth+'" height="1" alt="" border="0" /></td><td width="100%"></td></tr>';
	o=jsMenu;
	nb=0;
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("toolsnav=Y")!=-1) 
		{
		if (nb!=0) v+='<tr><td height="1" colspan="2" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>';
		nb++;
		if (oo[5].indexOf('javascript')!=-1 || oo[5].indexOf('#top')!=-1) {thepath=oo[5];}else{thepath=sitePath+oo[5];}
		v+='<tr><td class="navtools" height="16" style="" id="x'+(i+10)+'"><a href="'+thepath+'" onmouseover="ShowBar(\'x'+(i+10)+'\');" onmouseout="HideBar(\'x'+(i+10)+'\');">'+oo[4]+'</a></td><td></td></tr>';
		}
	}
	v+='<tr><td height="16"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td><td></td></tr>'
	v+='</table>';
	ds(v);	
	}
}
function showToolsnav()
{
	if (checkJsMenu())
	{
	initValues();
	var v, o, i;
	v='';
	o=jsMenu;
	onHomePage=(pageName=='' || pageName=='index.html')?true:false;
	if (showroom!='' && (!onHomePage || countryselector==''))
	{
		for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("showroom=Y")!=-1) 
		{
			showroomtxt=oo[4]
		}
	}
	v='<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td height="1"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr><tr><td height="16" class="navtools" valign="middle" width="'+navwidth+'" class="navtools" id="showroomlink" onmouseover="ShowBar(\'showroomlink\');" onmouseout="HideBar(\'showroomlink\');">'
	if (pageName.toLowerCase()=='showroom/index.html')
	{v+='<span style="color:#000000">'+showroomtxt+'</span>';}
	else
	{v+='<a href="/showroom/index.html">'+showroomtxt+'</a>';}
	v+='</td></tr></table><br>'
	}
	if (countryselector!='') 
	{
		if (onHomePage)
		{
			v+='<table border="0" cellspacing="0" cellpadding="0" width="100%">'
			v+='<tr><td width="149" height="1"><img src="/media/global/styles/images/spacer.gif" width="145" height="1" alt="" border="0" /></td><td width="100%"></td></tr>'
			v+='<tr><td rowspan="3"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="149" height="202">'
			v+='	<param name="movie" value="/media/global/flash/lex_50_map.swf" />'
			v+='	<param name="quality" value="high" />'
			v+='	<param name="bgcolor" value="#ffffff" />'
			v+='	<param name="menu" value="false" />'
			v+='	<embed src="/media/global/flash/lex_50_map.swf" menu="false" quality="high" bgcolor="#ffffff" width="149" height="202" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object></td><td height="16">'
			v+='</td></tr>'
			v+='<tr><td height="1" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>'
			v+='<tr><td height="185"></td></tr>'
			v+='<tr><td height="16" colspan="2"></td></tr>'
			v+='</table>'
		}
	}
	v+='<table border="0" cellspacing="0" cellpadding="0" width="100%">';
	v+='<tr><td width="'+navwidth+'" height="1"><img src="/media/global/styles/images/spacer.gif" width="'+navwidth+'" height="1" alt="" border="0" /></td><td width="100%"></td></tr>';
	nb=0;
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("toolsnav=Y")!=-1) 
		{
		if (nb!=0) v+='<tr><td height="1" colspan="2" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>';
		nb++;
		if (oo[5].indexOf('http')!=-1 || oo[5].indexOf('javascript')!=-1 || oo[5].indexOf('#top')!=-1) {thepath=oo[5];}else{thepath=sitePath+oo[5];}
		v+='<tr><td width="100%" class="navtools" height="16" style="" id="x'+(i+10)+'"><a href="'+thepath+'" onmouseover="ShowBar(\'x'+(i+10)+'\');" onmouseout="HideBar(\'x'+(i+10)+'\');">'+oo[4]+'</a></td><td></td></tr>';
		}
	}
	v+='<tr><td height="16"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td><td></td></tr>'
	v+='</table>';
	ds(v);	
	}
}
function showGlobalnavold()  //old one do not use
{
	if (checkJsMenu())
	{
	var v, o, i;
	//pageName=getPath(location.href)	
	v='<table border="0" cellspacing="0" cellpadding="0" width="100%">';
	v+='<tr><td width="'+navwidth+'" height="1"><img src="/media/global/styles/images/spacer.gif" width="'+navwidth+'" height="1" alt="" border="0" /></td><td width="100%"></td></tr>';
	o=jsMenu;
	nb=0
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("insitemap=N")==-1 && oo[10].indexOf("toolsnav=Y")==-1 && oo[10].indexOf("modelnav=Y")==-1 && oo[10].toLowerCase().indexOf("showroom")==-1) 
		{
		if (nb!=0) v+='<tr><td height="1" colspan="2" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>';
		nb++;
		fold=pageName.substr(0,pageName.indexOf('/'))
		if ('/'+fold+'/index.html'==sitePath+oo[5]) 
		{v+='<tr><td height="16" id="N'+(i+100)+'">'+oo[4]+'</td><td></td></tr>';}
		else
		{v+='<tr><td height="16" id="N'+(i+100)+'"><a href="'+((oo[5].toLowerCase().indexOf('javascript:')==-1)?sitePath:'')+oo[5]+'" onmouseover="ShowBar(\'N'+(i+100)+'\');" onmouseout="HideBar(\'N'+(i+100)+'\');">'+oo[4]+'</a></td><td></td></tr>';}
		}
	}
	v+='</table>';
	ds(v);	
	}
}
function showGlobalnav()
{
	if (checkJsMenu())
	{
	var v, o, i;
	//pageName=getPath(location.href)	
	v='<table border="0" cellspacing="0" cellpadding="0" width="100%">';
	v+='<tr><td width="'+navwidth+'" height="1"><img src="/media/global/styles/images/spacer.gif" width="'+navwidth+'" height="1" alt="" border="0" /></td><td width="100%"></td></tr>';
	o=jsMenu;
	nb=0
	for (i=0; i<o.length; i++) {
		oo=o[i].split('|')
		if (oo[0]=='0' && oo[10].indexOf("insitemap=N")==-1 && oo[10].indexOf("toolsnav=Y")==-1 && oo[10].indexOf("modelnav=Y")==-1 && oo[10].toLowerCase().indexOf("showroom")==-1) 
		{
		if (nb!=0) v+='<tr><td height="1" colspan="2" class="navline"><img src="/media/global/styles/images/spacer.gif" width="1" height="1" alt="" border="0" /></td></tr>';
		nb++;
		fold=pageName.substr(0,pageName.indexOf('/'))
		if ('/'+fold+'/index.html'==sitePath+oo[5]) 
		{v+='<tr><td height="16" id="N'+(i+100)+'">'+oo[4]+'</td><td></td></tr>';}
		else
		{
			if (oo[5].indexOf('http:')!=-1 || oo[5].indexOf('javascript')!=-1) {thepath=oo[5];}else{thepath=sitePath+oo[5];}
			v+='<tr><td width="100%" height="16" id="N'+(i+100)+'"><a href="'+thepath+'" onmouseover="ShowBar(\'N'+(i+100)+'\');" onmouseout="HideBar(\'N'+(i+100)+'\');">'+oo[4]+'</a></td><td></td></tr>';}
		}
	}
	v+='</table>';
	ds(v);	
	}
}
function showSubnav()
{
	if (checkJsMenu())
	{
	subfold=pageName.substr(pageName.indexOf('/')+1,pageName.lastIndexOf('/')-pageName.indexOf('/')-1).toLowerCase();
	carnav=false;
	theTree=new Tree(jsMenu);initMenu()
	for (i=0;i<theTree.items.length;i++) 
	{
		if (theTree.items[i].attributes[5]=='showroom/'+subfold+'/index.html' && theTree.items[i].attributes[15]!='') 
		{
			carnav=true;
			typeimg=theTree.items[i].attributes[15];
		}
	}
	lds('<table border="0" cellspacing="0" cellpadding="0" width="100%">')
	if (carnav) lds('<tr><td width="154" height="51" colspan="2"><img src="/menu/images/'+typeimg+'" width="154" height="51" alt="" border="0" /></td></tr>')
	lds('<tr><td width="16"><img src="/media/global/styles/images/spacer.gif" width="16" height="1" alt="" border="0" /></td><td width="138">')
	lds('<table border="0" cellspacing="0" cellpadding="0" width="100%">');
	if (!carnav) lds('<tr><td width="138" height="17"><img src="/media/global/styles/images/spacer.gif" width="138" height="17" alt="" border="0" /></td></tr>');
	sn=(carnav)?theTree.getTree(2, null, modelmenuGUI):theTree.getTree(1, null, menuGUI)
	lds(sn)
	lds('</table></tr></td></table>')
	if (!carnav)
	{
	p=p2=0;
	while(p2!=-1)
	{
	p=allText.indexOf("navtoolsselected");
	p2=allText.indexOf("navtoolsselected",(p+1))
	if (p2!=-1) allText=allText.substr(0,p)+'navtools'+allText.substr(p+16,allText.length)
	}
	p=allText.indexOf("navtoolsselected");
	if (p!=-1)
	{
		p2=allText.indexOf("<a",p);
		p3=allText.indexOf(">",p2);
		if (p2!=1 && p3!=-1) {allText=allText.substr(0,p2)+allText.substr(p3+1,allText.length)}
	}
	}
	if (sn.length>10) {ds(allText);} else {allText='';}
	}
}
function getActivePages(a) {
	var vc,par,tmp='|',i,o
	if (a==null) return ''
	if (a.activeItem==null) return ''
	o=a.items;vc=o[a.activeItem];i=0
	while (vc && i<20) {
		tmp+=vc.attributes[5]+'|';par=vc.attributes[3];i++
		if (par>'') vc=o[par]; else vc=null
	}
	return tmp
}
function pop(sLink)
{
openpopup(sLink,750,500);
}
function openpopup(sLink,iWidth,iHeight,left,name)
{
 if (left==null) left=0;
 G_day = new Date();
 G_seed = G_day.getTime();
 iRand = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*100000 + 1,10);
 if (name!=null) iRand=name;
 winleft = ((screen.width - iWidth) / 2)-left;
 winUp = (screen.height - iHeight) / 2;
 window.open(sLink,iRand,'resizable=yes,scrollbars=yes,width='+iWidth+',height='+iHeight+',left='+winleft+',top='+winUp);
}
function bookmarkPage() {
if (document.all) {window.external.AddFavorite(document.location.href,document.title);}
else {alert('Sorry, this feature is only supported in Internet Explorer')}
}
function printPage() {
if (document.all) {window.print();}
else {alert('Sorry, this feature is only supported in Internet Explorer')}
}
//if explorer (4.x)
if (document.all) {
	layerRef='document.all'
	styleRef='.style.'
}
//else if netscape (4.x)
else if (document.layers) {
	layerRef='document.layers'
	styleRef='.'
} 
function showthumb(theLayer){
    var tmpDiv = document.tmpDiv.tmpDiv.value;
	if(document.getElementById)	  //gecko(NN6) + IE 5+
	{
		if (tmpDiv != "0") 
		{
			var obj = document.getElementById(tmpDiv);
	        obj.style.visibility = "hidden" 
		}
        var obj = document.getElementById(theLayer);
        obj.style.visibility = "visible" 
	}
	else
	{
	if (tmpDiv != "0") 
		{
		    eval(layerRef+'[tmpDiv]'+styleRef+'visibility="hidden"')
		}
	eval(layerRef+'[theLayer]'+styleRef+'visibility="visible"')
	eval(layerRef+'[theLayer]'+styleRef+'top="102"')
	}
	document.tmpDiv.tmpDiv.value = theLayer;
}
function switchlang(url) {
     var lpageName
     lpageName = location.href
  popupWin01 = window.open(url+'?pagename='+lpageName, "_new", 'width=400,height=300')
}
function ModelOver( strElement )
{
	if( ! document.layers )
	{
		var obj;
		if( document.all )
		{
			obj = document.all[strElement].style;
		}
		else
		{
			obj = document.getElementById( strElement );
			if( obj.style ) obj = obj.style;
		}
		obj.color = "#000000";
	}
}
function ModelOut( strElement)
{
	if( ! document.layers )
	{
		var obj;
		if( document.all )
		{
			obj = document.all[strElement].style;
		}
		else
		{
			obj = document.getElementById( strElement );
			if( obj.style ) obj = obj.style;
		}
		obj.color = "#938f66";
	}
}
function ShowBar( strElement )
{
	if( ! document.layers )
	{
		var obj;
		if( document.all )
		{
			obj = document.all[strElement].style;
			o=document.all[strElement]
		}
		else
		{
			obj = document.getElementById( strElement );
			if( obj.style ) obj = obj.style;
		}
		obj.backgroundColor = "#f6d3ab";
	}
}
function HideBar( strElement )
{
	if( ! document.layers )
	{
		var obj;
		if( document.all )
		{
			obj = document.all[strElement].style;
		}
		else
		{
			obj = document.getElementById( strElement );
			if( obj.style ) obj = obj.style;
		}
		obj.backgroundColor = "#ffffff";
	}
}
function checkJsMenu()
{
	if (window.jsMenu) return (true)
	else
	{
		ds('Menu not published');	
	}
}
function pop_affiliate(sLink)
{
openpopup(sLink,770,600);
}

