var AQBCategory=new Array();
var AccessDenied="";

var IsPageLoadedCompletely=false;

var strJSOutBody3=null;
var strJSOutBody4=null;
var strJSOutBody5=null;
var strJSOutBody6=null;
var strJSOutBody7=null;
var strJSOutBody7JS=null;
var strJSOutBody8=null;
var strJSOutBody9=null;
var newWin=null;
var Text4Str=""; 
var Text2Str=""; 
var Button174=null;
var Undefined=String("undefined");


var allMenuItems = new Array();
var MAX_MENU_ROW = 2;
var menuColNumber = 1;

function ScrollDown(step, tabnum) {
	allMenuItems[tabnum]["startFrom"]+=step;
	DrawMenu(0);
}

function ScrollUp(step, tabnum) {
	allMenuItems[tabnum]["startFrom"]-=step;
	DrawMenu(0);
}

function AddMenuFolder(fid) {
	newfolder = new Object();
	newfolder["startFrom"] = 0;
	newfolder["folderId"] = fid;
	newfolder["menuItems"] = new Array();
	allMenuItems.push(newfolder);
}

function AddMenuButton(caption,func,width,height,tipcaption,enable,name,tabnum) {

	newitem = new Object();
	newitem["caption"] = caption;
	newitem["func"] = func;
	newitem["width"] = width;
	newitem["height"] = height;
	newitem["tipcaption"] = tipcaption;
	newitem["enable"] = enable;
	newitem["name"] = name;
	allMenuItems[tabnum]["menuItems"].push(newitem);
}

function AddScroll(width,height,position,left,top,isLeft,isRight,step,tabnum) {
	str="<div style='width:"+width+"px;height:"+height+"px;position: "+position+"; left: "+left+"px; top: "+top+"px;'>";
	str += "<table border=0 cellspacing=1 cellpadding=1 style='margin: 1px;'><tr>";
	str += "<td>"+(isLeft?"<a href='#' onClick='javascript: top.ScrollUp("+step+","+tabnum+");return false;'>":"")+"<img src='"+URLImages+"buttons/more_left"+(isLeft?"":2)+".gif' ' alt='" + DT_ALERT_183 + "' border=0'>"+(isLeft?"</a>":"")+"</td>";//<!--- #36161/ --->
	str += "<td class='tab' align=center width='100%'>" + DT_ALERT_180 + "</b></td>";//<!--- #36161/ --->
	str += "<td>"+(isRight?"<a href='#' onClick='javascript: top.ScrollDown("+step+","+tabnum+");return false;'>":"")+"<img src='"+URLImages+"buttons/more_right"+(isRight?"":2)+".gif' ' alt='" + DT_ALERT_184 + "' border=0'>"+(isRight?"</a>":"")+"</td>";//<!--- 36161/ --->
	str += "</tr></table></div>";
	return str;
}

function PrepareMenu() {
	allMenuItems = new Array();
}

var DelayedMenu=null;
function DrawMenu(fullRefresh) {
	if(DelayedMenu!=null) window.clearTimeout(DelayedMenu);
	tabnum = 0;
	currentWidth = 0;
	currentRow = 1;
	currentCol = 0;
	menuColNumber = -1;
	menu = top.f_0.document.getElementById("MenuArea");
        menuWidth = menu.offsetWidth;
	menuHeight = top.is.ie?66:64;
	idealCellWidth = (menuWidth - 8) / allMenuItems.length - 8;
	idealCellWidth = parseInt(idealCellWidth>98?98:idealCellWidth);

	for (i in allMenuItems) {
		if (fullRefresh) allMenuItems[tabnum]["startFrom"]=0;
		if (allMenuItems[i]["folderId"] == old_id) {
			tabnum = i;
		}
		tabCell = top.f_0.document.getElementById("Cell"+allMenuItems[i]["folderId"]);
		tabWidth = parseInt(tabCell.style.width);
		if (tabWidth != idealCellWidth) tabCell.style.width=idealCellWidth;
	}
	startFrom = allMenuItems[tabnum]["startFrom"];
	str = '<div id="menu" style="height: '+menuHeight+'px; overflow:hidden; padding: 1px;">';
	menuItems = allMenuItems[tabnum]["menuItems"];
	for (i in menuItems) {
		if (i < startFrom) continue;
		anItem = menuItems[i];
		currentWidth += anItem["width"] + 2;
		if (currentWidth > menuWidth-2) {
			if (currentRow==1) {
				menuColNumber=currentCol;
				offsetToLast=currentWidth - (anItem["width"] + 2);
			}
			currentWidth = anItem["width"] + 2;
			currentRow++;
			currentCol=0;
		}
		if (currentRow>MAX_MENU_ROW) { 
			break;
		}
		currentCol++;
		if ((currentCol == menuColNumber) && (currentRow == MAX_MENU_ROW) 
				&& ((i < menuItems.length-1) || startFrom>1)) {

			str+=AddScroll(anItem["width"], anItem["height"], 'relative', 
				offsetToLast-anItem["width"]-2, 
				-anItem["height"], startFrom>0, 1, menuColNumber, tabnum);
		} else {
			str+=AddButtonAdvaced(anItem["caption"],anItem["func"],anItem["width"],anItem["height"],
				anItem["tipcaption"],anItem["enable"],anItem["name"]);
		}
	}

	if (startFrom>1 && ((currentCol < menuColNumber) || (currentRow < MAX_MENU_ROW))) {
		str+=AddScroll(anItem["width"], anItem["height"], 'relative', 
			offsetToLast-anItem["width"]-2, 
			currentRow == MAX_MENU_ROW ? -anItem["height"] : 2, 1, 0, 
			menuColNumber>0 ? menuColNumber : currentCol, tabnum);
	}
	str += '</div>';
	menu.innerHTML=str;
}

function ReDrawMenu() {
	if (this.ie) {
		DrawMenu(1);
	} else {
		DelayedMenu =  setTimeout("DrawMenu(1)", 100);
	}
}


function f1x1(w,h){
	return ("<table cellpadding=0 cellspacing=0 border=0><tr><td width="+(w==null?1:w)+" height="+(h==null?1:h)+"></td></tr></table>");
}

function Browser(){
	var b=navigator.appName;
	this.b=null;
	this.version=navigator.appVersion;
	if(b){
		if(b.indexOf('Netscape')!=-1) this.b="ns";
		else{
			if(b=="Opera" || navigator.userAgent.indexOf("Opera")>0) this.b="opera";
			else
				if(b=="Microsoft Internet Explorer") this.b="ie";
		}
	}
	if (this.b!=null){
		var useragent=navigator.userAgent;
		var pos=useragent.indexOf('MSIE');
		if(pos>-1){
			var bVer=useragent.substring(pos+5);
		 	this.v=bVer.substring(0,bVer.indexOf(';'));
			ch=this.v.charAt(this.v.length-1)
			if(!(ch>"0" && ch<"9")){
				this.v=this.v.substring(0,this.v.length-1);
			}
		}
		if(this.b=="opera"){
			var pos=navigator.userAgent.indexOf('Opera');
			if (pos>-1){
				var bVer=navigator.userAgent.substring(pos+6);
				this.v=bVer.substring(0,bVer.indexOf(' '));
			}
		}
		if(this.b=="ns") this.v=this.version.substring(0,this.version.indexOf(' '));
		this.v=this.v*1
		this.ns=(this.b=="ns" && this.v>=4);
		this.ns4=(this.b=="ns" && this.v>=4 && this.v<5);
		this.ns6=(this.b=="ns" && this.v>=5);
		this.ie=(this.b=="ie" && this.v>=4);
		this.ie4=(this.version.indexOf('MSIE 4')>0);
		this.ie5=(this.version.indexOf('MSIE 5')>0);
		this.ie55=(this.version.indexOf('MSIE 5.5')>0);
		this.ie6=(this.version.indexOf('MSIE 6.0')>0);
		this.safari=(this.version.indexOf('Safari')>0);
		this.Img1x1=((this.ie && this.v>=5) || this.ns6)?"":" src='"+URLImages+"common/1x1.gif'";
		this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)?true:false;
		this.def=(this.b=="ie" || this.dom);
		var ua=navigator.userAgent.toLowerCase();
		if(ua.indexOf("win")>-1) this.platform="win32";
		else{
			if(ua.indexOf("mac")>-1) this.platform="mac";
			else this.platform="other";
		}
	}			
}
is=new Browser();

function fSetCookie(name, value, expires, path, domain, secure) {
        var curCookie = name + "=" + escape(value) +
                ((expires) ? "; expires=" + expires.toGMTString() : "") +
                ((path) ? "; path=" + path : "") +
                ((domain) ? "; domain=" + domain : "") +
                ((secure) ? "; secure" : "")
        if ((name + "=" + escape(value)).length <= 4000)
                document.cookie = curCookie
}
function fGetCookie(name) {
        var prefix = name + "="
        var cookieStartIndex = document.cookie.indexOf(prefix)
        if (cookieStartIndex == -1)
                return null
	else
	{
	        var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	        if (cookieEndIndex == -1)
	                cookieEndIndex = document.cookie.length
	        return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
	}
}

function fIsDefined(id,fr){
	if(id!=null){
		fr=((fr==null)?"f_0":fr);
		if(is.ie) return ((window.frames[fr]) && String(window.frames[fr].document.all[id])!=Undefined);
		else return ((window.frames[fr]) && window.frames[fr].document.getElementById(id)!=null) // #34
	}else return false;
}

function fSrc(id,value){
	if(fIsDefined(id)){
		if(is.ie) window.f_0.document.all[id].src=value;
		else if(is.ns6) window.f_0.document.getElementById(id).src=value;
	}
}

function fDisplay(id,value){
	if(fIsDefined(id)){
		if(is.ie) window.f_0.document.all[id].style.display=value;
		else if(is.ns6) window.f_0.document.getElementById(id).style.display=value;
	}
}

function fClassName(id,name){
	if(fIsDefined(id)){
		if(is.ie) window.f_0.document.all[id].className=name;
		else if(is.ns6) window.f_0.document.getElementById(id).className=name;
	}
}
function fVisibility(id,value){
	if(fIsDefined(id)){
		if(is.ie) window.f_0.document.all[id].style.visibility=value;
		else if(is.ns6) window.f_0.document.getElementById(id).style.visibility=value;
	}
}

function GoToLocation(Module,vFuseAction,Params, LoadScreen, PopUpTip){//<!--- #20/ added 4th parameter. It controls if to show the Wait Screen ---><!--- #21 /added 5th parameter. It contains popup text --->
	if(window.f_8){

    Params=Params||"";
    var regExpForTimeout = /(^RequestTimeout=)|(&RequestTimeout=)/i;
    var isTimeoutHere=Params.search(regExpForTimeout);
    if(isTimeoutHere<0){
      Params = Params + ((Params!="")?"&":"") + (String(globalLK4DefaultTimeout) != "undefined" ? 'RequestTimeout='+globalLK4DefaultTimeout : '');
    } 

		var FuseAction=Module+"."+vFuseAction;

		if ((top.IsPageLoadedCompletely == false) || (top.fGetCookie('PageLoadedComp') == '0')) Params =Params + ((Params!="")?"&":"")+ 'RepaintAllFrames=1';

		if(String(window.f_8.SubmitFormF8)!=Undefined) window.f_8.SubmitFormF8(Module,FuseAction,Params, LoadScreen)//<!--- #20/ added 4th parameter. It controls if to show the Wait Screen in SubmitFormF8 method --->

		else
    { if(LoadScreen) top.load2();
      window.f_8.location.href = "index.cfm?FuseAction=" + FuseAction+((Params!="")?"&" + Params:"") + "&"+ClientURLToken;
     }
    if(PopUpTip) alert(PopUpTip);//<!--- #21 /--->

	}
	return false;
}

function GoToLogin(s){
	window.f_8.location.href="index.cfm?FuseAction=MyAccount.Login&"+ClientURLToken+"&NextUrl="+escape(window.f_8.location+((s!=null)?"&"+s:""));
	return false;
}

function GoToRegister(s){
	window.f_7.location.href="index.cfm?FuseAction=UserAccount.Registration&"+ClientURLToken+"&NextUrl="+escape(window.f_8.location+((s!=null)?"&"+s:""));
	return false;
}

function GoAdvanced(){
	if(String(window.f_8.SubmitFormF8)==Undefined || confirm(DT_ALERT_01))// #1,#26 // #36161 /
		top.location.href="index.cfm?FuseAction=StartSearch.ChangeVersion&BasicVersion=False&"+ClientURLToken+"&rnd="+escape(Math.random()); //#34
	return false;
}

function GoBasic(){
	if(String(window.f_8.SubmitFormF8)==Undefined  || confirm(DT_ALERT_02))// #1,#26 // #36161 /
		top.location.href="index.cfm?FuseAction=StartSearch.ChangeVersion&BasicVersion=True&"+ClientURLToken+"&rnd="+escape(Math.random()); // #34
	return false;
}

function fStop(){
	alert(DT_ALERT_03); // #36161 /
	return false;
}

function fWinClose(win){if(win!=null && !win.closed) win.close();}
function fWinFocus(win){if(win!=null) win.focus();}
function fWinOpen(win,sURL,sName,sFeatures){
	fWinClose(win);
	win=window.open(sURL,sName,sFeatures);
	fWinFocus(win);
	return win;
}

var tipwind=null;
function fPopTip(IDTip){
	tipwind=fWinOpen(tipwind,"index.cfm?FuseAction=WID.ShowTip&"+ClientURLToken+"&Tip_ID="+IDTip,"tipwind","scrollbars=1,resizable="+isAboutUsResizable+",width=400,height=330,left=0,top=0") // change width=300 on 400 <!--- #16/ ---> <!--- #29 changed 0 to "+isAboutUsResizable+" / --->
	return false;
}

var popup=null;
function ContactClick(){
	popup=fWinOpen(popup,'index.cfm?FuseAction=Help.contact&'+ClientURLToken,'Help','scrollbars=1,resizable=1,width=400,height=300,left='+((AolLeftTop),0,10)+',top='+((AolLeftTop),0,10))
	return false;
}

var popup1=null;

var FuseactionID=null;
function SetupFuseactionID(f_id){
FuseactionID=f_id;
return false;
}

function HelpClick(){
  popup1=fWinOpen(popup1,"index.cfm?Fuseaction=Help.RoboHelp&"+ClientURLToken+"&MapId="+FuseactionID,'Help','scrollbars=1,resizable=1,width='+(screen.width-100)+',height='+(screen.height-150)+',left=50,top=50');//#22,#25
	return false;
}

function HelpDyna(){
	popup=fWinOpen(popup,'index.cfm?FuseAction=Help.Dyna&'+ClientURLToken,'Help','scrollbars=1,resizable=1,width=528,height=411')
	return false;
}

var popupDDir;
function LiveHelp() {
LiveHelpURLFull = eval(LiveHelpURL);
	if(popupDDir && !popupDDir.closed) popupDDir.focus();

    else popupDDir=window.open(LiveHelpURLFull,'_blank', 'menubar=0,toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width=560,height=340,left=5,top=5');

	popupDDir.onerror=null;
	onerror=null;
	return false
}

self.focus();
function fReWrite(id,str,noclose){
	if(window.frames[id]){
		if(is.ie6)
			window.frames[id].document.open("","_self","",true);

		else if(!is.ns6) window.frames[id].document.open("about:blank","replace");
		window.frames[id].document.write(str);
		if (noclose==null)
		window.frames[id].document.close();
	}
}

var frameOutputBody0JS=null;
function ShowLoadingStatus(){fReWrite("f_8",'<body class="deff8"><table width="100%" height="100%" border=0 cellspacing=0 cellpadding=0><tr><td class="TextClass" align=center><img border=0 align=middle width=205 height=27 src="'+imgPath+'common/wait2.gif" align=""></td></tr></table></body>');}
function WriteF7(str){
	if(str!=null){
		fReWrite("f_7","<html>"+str+((str.indexOf('<body')!=-1 && str.indexOf('</body>')==-1)?'</body>':"")+"</html>", 1); // #30/

		if(is.ns6) {
			window.setTimeout("window.frames['f_7'].document.close(); window.stop(); DoSessionAlive('go');", 500);
			return
		} else
			window.frames['f_7'].document.close();

	}
	DoSessionAlive("go");
}
function WriteF0(){fReWrite("f_0",frameOutputBody0JS)}
function WriteF9(str){if(window.f_9) fReWrite("f_9","<html>"+str+"</html>"); else GoAdvanced();}

var RefreshTimeout=null;
function DoSessionAlive(rerun){
  if(rerun==null){
    if(RefreshTimeout!=null) window.clearTimeout(RefreshTimeout);
    fSrc("RefreshImg","Index.cfm?Fuseaction="+escape("Default.KeepSessionAlive")+"&"+ClientURLToken+"&rnd="+escape(Math.random()));//<!--- #33/ --->
    RefreshTimeout=window.setTimeout("DoSessionAlive()",900000);
  }
}

var TipID=0;

function ButtonsCreate(id){
	if(eval("strJSOutBody"+id+"==null")) window.f_8.location.href="index.cfm?Fuseaction=Default.SMRepaint&RepaintAllFrames=1&"+ClientURLToken;
	else{
		eval(eval("strJSOutBody"+id));
		if(is.ie4 && id==4) fOnLoadF0();
	}
}

var Bracket='"';
var tabindex="";

var mode=1;
var Text3Str=""; 
function WriteInText3(str){Text3Str+=str;}

function DspText3(){
	if(fIsDefined("TextT3"))
		WriteTi(Text3Str,"TextT3");
	else
		window.f_8.location.href="index.cfm?Fuseaction=Default.SMRepaint&RepaintAllFrames=1&"+ClientURLToken;
	Text3Str="";
}

function ClearText3(){
	Text3Str="";
	WriteTi("","TextT3");
}

function AddBeginFolder(){
	WriteInText3("<table border=0 cellspacing=0 cellpadding=0 width='100%' align=left height=10><tr><td align=left><table border=0 cellspacing=0 cellpadding=0 align=left><tr><td width=5>"+f1x1(7)+"</td>");
}


function AddFolder(BtnW,fid,dlink,fldBG,tabs,Name,fontSize){
  fontSizeParam = "";
  if (typeof(fontSize) != "undefined" && fontSize != "")
  {
    fontSizeParam = "style='font-size:"+fontSize+" px'";
  }

  WriteInText3("<td align=left valign=top><table border=0 cellspacing=0 cellpadding=0 onclick="+Bracket+"top.SwitchFolder('"+fid+"');"+dlink+Bracket+" style='cursor: pointer;'><tr id='FID"+fid+"' class='FolderBG2'><td width=4><img src='"+URLImages+"common/t_l1.gif' width=4 height="+tabs+"></td><td style='width: "+eval(BtnW+"-8")+"' valign=middle align=center id='Cell"+fid+"'><b><span id='FIDTab"+fid+"' class='tab_inactive' " + fontSizeParam + " >"+Name+"</span></b></td><td width=4><img src='"+URLImages+"common/t_r1.gif' width=4 height="+tabs+"></td></tr><tr><td height=1 colspan=3 class='FolderBG2' id='FolderBG"+fid+"IDLine' style='visibility:hidden;'><img height=1 width=1 border=0"+is.Img1x1+"></td></tr></table></td><td width=1></td>"); //34
}

function AddEndFolder(){
	WriteInText3("<td width=5>"+f1x1(5)+"</td></tr></table></td></tr>");

}

function AddBeginButtons(height1,width,height2){
	WriteInText3("<tr><td height="+height2+" width="+width+" align='left' id=MenuArea class=FolderBG1>"); 
}

function WriteInText2(str){Text2Str+=str;}
function WriteInText4(str){Text4Str+=str;}

function DspText4(){
	if(Text4Str!="") WriteTi(Text4Str,"TextT4");
	Text4Str="";

  if (is.ns6) {
    top.f_0.document.getElementById("TextT3").width = 407;
  }

}

function ClearText4(){
	Text4Str="";
	if(Text4Str!="") WriteTi("","TextT4");
}

function AddBeginRightButton1(BWidth,BHeight){
	WriteInText4("<tr><td width="+BWidth+" height="+BHeight+">");
}
function AddBeginLeftButton1(BWidth,BHeight){
	WriteInText2("<tr><td width="+BWidth+" height="+BHeight+">");
}

function AddBeginRightButton2(BWidth,BHeight){
	WriteInText4("<tr><td width="+BWidth+" height="+BHeight+">"+f1x1(BWidth));
}
function AddBeginLeftButton2(BWidth,BHeight){
	WriteInText2("<tr><td width="+BWidth+" height="+BHeight+">"+f1x1(BWidth));
}

function fNewImage(img){
	var imgNew = new Image();
	imgNew.src=URLImages+img;
}

function AddRightButton(fid, lnk, MOver,MOut,BHeight,Name,img,ht) {
   	WriteInText4("<table width='100%' border=0 cellspacing=0 cellpadding=0 class=fr2button id='"+fid+"' onClick="+Bracket+lnk+Bracket);
   	if(mode==1 && (is.ie || is.ns6)) WriteInText4(" onmouseover="+Bracket+"this.className='fr2buttonover';"+MOver+Bracket+" onmouseout="+Bracket+"this.className='fr2button';"+MOut+Bracket);
   	WriteInText4("><tr style='cursor: pointer;'><td width=6 valign=middle height="+BHeight+">&nbsp;</td><td width='100%' valign=middle height="+BHeight+"><font class='btn' style='cursor: pointer;'><b>"+Name+"</b></font></td><td width=23 valign=middle height="+BHeight+"><img src='"+URLImages+"buttons/"+img+"' border=0 align=right></td><td width=6 valign=top><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td colspan=2 width=6 valign=top height=6><img src='"+URLImages+"common/g4.gif' width=6 height=6></td></tr><tr><td width=5>"+f1x1(1,ht)+"</td><td width=1 class='buttonline'>"+f1x1(1,ht)+"</td></tr></table></td></tr></table><table width='100%' border=0 cellspacing=0 cellpadding=0 class='buttonline'><tr><td width='100%' height=1>"+f1x1(10)+"</td></tr></table></td></tr>"); //#34//<!--- #36161/ --->
    
}
 
//<!--- #36161 --->
  function fOpenChangeLangMenu(setVisible){
    var langMenu = top.f_0.document.getElementById("changeLanguageMenu");
    var isAVMenu = (!top.fIsDefined("langLink"));
    if (fOpenChangeLangMenu.arguments.length == 0){
      setVisible = (langMenu.style.visibility != "visible");
    }

    langMenu.style.display = setVisible?"inline":"none";
    langMenu.style.visibility = setVisible?"visible":"hidden";
    langMenu.style.top = top.f_0.document.getElementById("langMenuContainer").offsetHeight;
    top.f_0.document.getElementById("langMenuContainer").style.zIndex = 100;
 
    if (isAVMenu){
      top.f_0.document.getElementById("Language").onmouseout = setVisible?function(){this.className = "fr2buttonover";} : function(){this.className = "fr2button";};    
      langMenu.style.top = parseInt(langMenu.style.top) - 1;
    }else{
      var langLink = top.f_0.document.getElementById("langLink");
      langLink.className = setVisible?"tab open":"tab";      
      langMenu.style.left = langLink.offsetLeft;
      langMenu.style.width = langLink.offsetWidth;
    }
  }
  
  function fCreateChangeLangMenu(isAV, strucLangMenuItems){
    
    var arrLangSupported = strucLangMenuItems["arrsupportedlocales"];
    var langMenu = "<ul class='"+ ((isAV)?"language-list pro":"language-list basic") +"' style='display: none; visibility: hidden;' id='changeLanguageMenu'>";
    var langQty = arrLangSupported.length;
    
    for (i = 0; i < langQty; i++){
      var menuItem = "";
      if (i==0){menuItem = "first";}
      if (i==(langQty-1)){menuItem = menuItem + " last";}
      if (arrLangSupported[i]["locale"] == strucLangMenuItems["currentlocale"]){menuItem = menuItem + " active";}
      
      menuItem = menuItem.replace(/^\s+|\s+$/g, "");
 
      if (menuItem.length > 0){
        menuItem = " class='" + menuItem + "'";
      }
      langMenu = langMenu + "<li" + menuItem + "><a href='javascript: void top.ChangeLanguage("+Bracket+ arrLangSupported[i]["locale"] +Bracket+");'>"+arrLangSupported[i]["description"]+"</a></li>";
    }
    langMenu = langMenu + "</ul>";

    return langMenu;
  }

function AddChangeLangButton(fid, lnk, MOver, MOut, BHeight, Name, img, ht, strucLangMenuItems) {
  WriteInText4("<div id='langMenuContainer' class='language-list-container'>");
  WriteInText4("<table width='100%' cellspacing='0' cellpadding='0' border='0' onmouseout="+Bracket+"this.className='fr2button';"+MOut+Bracket+" onmouseover="+Bracket+"this.className='fr2buttonover';"+MOver+Bracket+" onclick="+Bracket+lnk+Bracket+" id='"+fid+"' class='fr2button'><tbody>");
  WriteInText4("<tr style='cursor: pointer;'><td width='6' valign='middle' height='"+BHeight+"'>&nbsp;</td><td width='100%' valign='middle' height='"+BHeight+"'><font style='cursor: pointer;' class='btn'><b>"+Name+"</b></font></td><td width='23' valign='middle' height='"+BHeight+"'><img border='0' align='right' src='"+URLImages+"buttons/"+img+"'></td><td width='6' valign='top'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tbody><tr><td width='6' valign='top' height='6' colspan='2'><img width='6' height='6' src='"+URLImages+"common/g4.gif'></td></tr><tr><td width='5'>" +f1x1(1,ht)+ "</td><td width='1' class='buttonline'>" +f1x1(1,ht)+ "</td></tr></tbody></table></td></tr></tbody></table>");//<!--- #38986/ --->
	WriteInText4("<table width='100%' cellspacing='0' cellpadding='0' border='0' class='buttonline'><tbody><tr><td width='100%' height='1'>"+f1x1(10)+"</td></tr></tbody></table>");
  WriteInText4(top.fCreateChangeLangMenu(true, strucLangMenuItems));
  WriteInText4("</div>");
}

function AddLangFolderBV(FBtnW,fldBG,fid,Lin,tipcaption,currentrecord,tabs,Name,ctr,tabrow,strucLangMenuItems){
    WriteInText3("<td width='33%'><table width='100%' cellspacing='0' cellpadding='0' border='0' onclick="+Bracket + Lin + Bracket+((user_assiston==1 && tipcaption!="")?" onMouseOver="+Bracket+"top.showtip(this,event,'"+tipcaption+"')"+Bracket+" onMouseOut='top.hidetip()'":"")+ " id='" +fid+ "'><tbody><tr class='BVFolderBG" +fldBG+ "'>" +((currentrecord>3)? ("<td width='4'><img width='4' height='" +tabs+ "' src='"+URLImages+"common/t_l0.gif'></td>") : ("<td width=4><img src='"+URLImages+"common/t_l.gif' width=4 height="+tabs+"></td>")) +  "<td width='100%' valign='middle' align='center'><div id='langMenuContainer' class='language-list-container' style='min-width:91px;'><a id='langLink' href='#' onclick='javascript: return false;' class='tab'>"+Name+"</a>"+top.fCreateChangeLangMenu(false,strucLangMenuItems)+"</div></td>"+((currentrecord>3)?"<td width='4'><img width='4' height='"+tabs+"' src='" +URLImages+ "common/t_r0.gif'></td>" : "<td width=4><img src='"+URLImages+"common/t_r.gif' width=4 height="+tabs+"></td>") + "</tr></tbody></table></td>" + ((ctr!=2)?"<td width='10'"+((tabrow>1)?" class='BVFolderBG"+(fldBG+1)+"'":"")+" valign='bottom'>"+((tabrow>1)?"<img src='"+URLImages+"common/tabsbg.gif' width='10' height='23'>":f1x1(10,20))+"</td>":""));//<!--- #38135/ --->
}
//<!--- /#36161 --->

 
function AddLeftButton(fid, lnk, MOver,MOut,BHeight,Name,img,ht) {
    ns6tbl = "<table cellpadding=0 cellspacing=0 border=0 width=1 ><tr><td></td></tr></table>";
  	WriteInText2("<table width='100%' border=0 cellspacing=0 cellpadding=0 class=fr2button id='"+fid+"' onClick="+Bracket+lnk+Bracket);  	
   	if(mode==1 && (is.ie || is.ns6)) WriteInText2(" onmouseover="+Bracket+"this.className='fr2buttonover';"+MOver+Bracket+" onmouseout="+Bracket+"this.className='fr2button';"+MOut+Bracket);
  	WriteInText2("><tr valign=middle style='cursor: pointer;'"); //#34
   	WriteInText2("><td width=6 valign=top height="+BHeight+"><img src='"+URLImages+"common/g3.gif' width=6 height=6></td><td width='100%' valign=middle height="+BHeight+"><font class='btn' style='cursor: pointer;'"); //#34
   	WriteInText2("><b>"+Name+"</b></font></td><td valign=middle><img src='"+URLImages+"icons/"+img+"' width=12 height=12 border=0 align=right vspace=3 style='margin:3px;'></td><td width=1 class='buttonline'>"+((is.ns6)?ns6tbl:f1x1(1,ht))+"</td></tr></table><table width='100%' border=0 cellspacing=0 cellpadding=0 height=1 class='buttonline'><tr><td class='buttonline' width='100%'>"+f1x1(10)+"</td></tr></table></td></tr>");
}

function DspText2(){
	if(Text2Str!=""){
		WriteTi(Text2Str,"TextT2");
		Text2Str="";
	}
}
function AddBeginFoldersBV(Height){
  var divWidth = ((document.body.clientWidth > 1145) && ('\v'=='v')) ? "style='width:640px'" : "";//<!--- #38135/ --->
  WriteInText3("<table border=0 cellspacing=0 cellpadding=0 align=left width='100%'><tr><td height="+Height+"></td></tr><tr><td align=left valign=top><table border=0 cellspacing=0 cellpadding=0 align=left width='100%' height='100%'><tr><td width='100%' class='BVTButtons'><div class='BVDButtons' id='BVDButtons1' "+divWidth+"><table style='width:100%' cellspacing='0' cellpadding='0' border='0'><tr>");//<!--- #38135/ --->
}
function AddLastFolderInRowBV(ctr,fldBG,emptyrow){
  var divWidth = ((document.body.clientWidth > 1145) && ('\v'=='v')) ? "style='width:640px'" : "";//<!--- #38135/ --->
  WriteInText3("</td></tr></table></div></tr><tr class=BVFolderBG"+fldBG+" height="+emptyrow+"><td>"+f1x1(1,emptyrow)+"</td></tr><tr><td width='100%' class='BVFolderBG"+fldBG+" BVTButtons' valign=bottom style='background-image: url("+URLImages+"common/tabsbg.gif);background-position: center bottom;background-repeat: repeat-x;'><div class='BVDButtons' id='BVDButtons2' "+divWidth+"><table style='width:100%' cellspacing='0' cellpadding='0' border='0'><tr>");//<!--- #38135/ --->
}
function AddFolderBV(FBtnW,fldBG,fid,isdef,Lin,tipcaption,currentrecord,tabs,Name,ctr,tabrow,FBtnWO){//<!--- #38135/ --->

  WriteInText3("<td width='33%'>" +
  "<table class=BVFolderBG"+fldBG+" id="+fid+" border=0 cellspacing=0 cellpadding=0"+((is.ie)?" style='cursor: pointer;'":"")+" onClick="+Bracket+((fid=="advancedsystem" && isdef!="YES")?"javascript: void top.GoToLocation('MyAccount','SetBenefits','ClearF7=true')":Lin)+Bracket+((user_assiston==1 && tipcaption!="")?" onMouseOver="+Bracket+"top.showtip(this,event,'"+tipcaption+"')"+Bracket+" onMouseOut='top.hidetip()'":"")+" width='100%'>" +
    "<tr class=BVFolderBG"+fldBG+">"+
    ((currentrecord>3)?
      "<td width=4><img src='"+URLImages+"common/t_l0.gif' width=4 height="+tabs+"></td>":
      "<td width=4><img src='"+URLImages+"common/t_l.gif' width=4 height="+tabs+"></td>") +
    "<td width='100%' valign=middle align=center>" +
       "<table width='"+FBtnWO+"px' style='text-align:center'>" +
         "<tr><td width='100%'><font class='tab'><b>"+Name+"</b></font></td></tr>" +
       "</table>" +
      "</td>"+
      ((currentrecord>3)?
        "<td width=4><img src='"+URLImages+"common/t_r0.gif' width=4 height="+tabs+"></td>":
        "<td width=4><img src='"+URLImages+"common/t_r.gif' width=4 height="+tabs+"></td>")+
      "</tr>" +
  "</table></td>"
  +
  ((ctr!=2 && ctr!=5)?
  "<td width='10'"+
    ((tabrow>1)?" class=BVFolderBG"+(fldBG+1):"")+
    " valign=bottom "+((tabrow>1)?"style='background-image: url("+URLImages+"common/tabsbg.gif);background-position: center bottom;background-repeat: repeat-x;'":"")+">"+
      ((tabrow>1)?
        "<img src='"+URLImages+"common/tabsbg.gif' width=10 height=23>":
        "<img src='"+URLImages+"common/1x1.gif' width='10' height='20'>")+
    "</td>":""));//<!--- #36 ---><!--- #38135/ --->

}


function AddEmptyFolderBV(FBtnW,fldBG,tabs,ctr,tabrow){
  if (tabrow > 1){
    WriteInText3("<td width='33%' valign=top align=left class=BVFolderBG"+fldBG+"><table width='100%' border=0 cellspacing=0 cellpadding=0"+"><tr class=BVFolderBG"+fldBG+">"+"<td width="+(FBtnW)+((tabrow>1)?" class=BVFolderBG"+(fldBG+1):"")+" height="+tabs+" valign=bottom align=center style='background-image: url("+URLImages+"common/tabsbg.gif); background-position: 0 100%; background-repeat: repeat-x;'><img src='"+URLImages+"common/1x1.gif' width='100%'  height=23></td>"+"</tr></table></td>"+((ctr<5)?"<td width=10"+((tabrow>1)?" class=BVFolderBG"+(fldBG+1):"")+" valign=bottom>"+((tabrow>1)?"<img src='"+URLImages+"common/tabsbg.gif' width=10 height=23>":f1x1(10,20))+"</td>":""));//#38135/
  }
}

function AddEndFoldersBV(fldBG,emptyrow){
	WriteInText3("</td></tr></table></div></tr><tr class='BVFolderBG"+fldBG+"'><td>"+f1x1(1,emptyrow)+"</td></tr></table></td></tr></table>");//<!--- #38135/ --->
}
var strJSOutBody=null;
var strJSOutBodyBasic=null;
function CreateFoldersBV(){
	if(strJSOutBody!="" && strJSOutBodyBasic==null)
		window.f_8.location.href="index.cfm?Fuseaction=Default.SMRepaint&RepaintAllFrames=1&"+ClientURLToken;
	else
		eval(strJSOutBodyBasic);
}
function pop_tip(){fPopTip(TipID);}

function ShowTip(){
	fVisibility("TipBtn","visible")
}

function HideTip(){
	fVisibility("TipBtn","hidden")
}

function WriteTi(value,id){
	if(fIsDefined(id)){
		if(is.ie) window.f_0.document.all[id].innerHTML=value;
		else if(is.ns6) window.f_0.document.getElementById(id).innerHTML=value;
	}
}

var WIDNext="&nbsp;";
var WIDNow="&nbsp;";
var WIDFlag=true;

function WriteT1(str){WriteTi(str,"TextT1")}
function WriteT2(str){WriteTi(str,"TextT2")}
function WriteT3(str){WriteTi(str,"TextT3")}
function WriteT4(str){WriteTi(str,"TextT4")}
function WriteT5(str){WriteTi(str,"TextT5")}
function WriteT6(str){WriteTi(str,"TipText")}
function SetupTip(id){TipID=id;}
function WriteWID(str){WriteTi(((is.ns6)?"<table cellpadding=0 cellspacing=0 border=0><tr><td class=\"sm\">":"")+str+((is.ns6)?"</td></tr></table>":""),"TextWID")}

function AddButtonAdvaced(caption,func,width,height,tipcaption,enable,name){
	thisbutton='';
	if(name==null || name=="") return thisbutton;
	thisbutton+="<button TYPE=button NAME='"+name+"' id='"+name+"'";
	if(tabindex.length > 0) thisbutton+=" tabindex='"+tabindex+"'";
	if(enable=="True") {
		if(user_assiston==1 && tipcaption!="") 
			thisbutton+=" onMouseOver="+Bracket+"this.className='BtnOver';top.showtip(this,event,'"+tipcaption+"')"+Bracket+" onMouseOut="+Bracket+"this.className='BtnNormal';top.hidetip()"+Bracket;
		else
			thisbutton+=" onMouseOver="+Bracket+"this.className='BtnOver';"+Bracket+" onMouseOut="+Bracket+"this.className='BtnNormal';"+Bracket;
		thisbutton+=" class=BtnNormal onClick="+Bracket+func+Bracket;
	} else thisbutton+=" class=BtnGrey disabled";
	if (is.safari) {
		thisbutton+=" style='width:"+width+";height:"+height+";margin: 1px;vertical-align: top;'";
		thisbutton+="><div style='margin: -4px;'>"+caption+"</div></button>";
	} else if (is.ns6) {
		thisbutton+=" style='width:"+width+";height:"+height+";margin: 1px;vertical-align: top;'";
		thisbutton+="><div style='margin: -6px;position:relative;top:-2px;left:1px;'>"+caption+"</div></button>";
	} else {
		thisbutton+=" style='position:relative;width:"+width+";height:"+height+";margin: 1px;'";
		thisbutton+=">"+caption+"</button>";
	}
	return thisbutton
}

var startbodyf6="";
function fAVpowerCancel(){
	WriteTi(startbodyf6,"TipText")
}

function SetupWID(snow,snext){
	WIDNow=String(snow);
	WIDNext=String(snext);
	WIDFlag=false;
	SwitchNN();
}

function SwitchNN(){
	WIDFlag=!WIDFlag;
	TitleNow=DT_ALERT_181;//<!--- #36161/ --->
	TitleNext=DT_ALERT_182;//<!--- #36161/ --->
	if(fIsDefined("TitleWIDNow")){
		WriteTi(((WIDFlag)?TitleNow:TitleNext),"TitleWIDNow");
		WriteTi(((WIDFlag)?TitleNext:TitleNow),"TitleWIDNext");
		WriteWID(((WIDFlag)?WIDNow:WIDNext))
	}

  else if (!fIsDefined("Btn451", "f_8"))
  {
    GoBasic()
  }

	return false;		
}

var CurrentFolder=null;
var old_id=null; 
var IsNeedLateInit=false;

function SwitchFolder(FolderID){
	fClassName("FID"+old_id,"FolderBG2");

	fClassName("FIDTab"+old_id,"tab_inactive");

	fClassName("FolderBG"+old_id+"IDLine","FolderBG2");
	fClassName("BID"+old_id,"FolderBG2");
	if(!fIsDefined("FID"+FolderID)){
		if (IsNeedLateInit) return;
		window.f_8.location.href="index.cfm?Fuseaction=Default.SMRepaint&RepaintAllFrames=1&"+ClientURLToken;
		return;
	}
	fClassName("FID"+FolderID,"FolderBG1");

	fClassName("FIDTab"+FolderID,"tab");

	fClassName("FolderBG"+FolderID+"IDLine","FolderBG1");
	fClassName("BID"+FolderID,"FolderBG1");
	old_id=FolderID;
	SwitchFolderFullName("FolderBG"+FolderID+"ID");
	DrawMenu(0);
}
function SwitchFolderFullName(FolderID){

	fVisibility(CurrentFolder+"Line","hidden")

	fVisibility(FolderID+"Line","visible")
	CurrentFolder=FolderID;
}

function fLastLoad(iDate){
	if(iDate<LastLoadDate)
		window.f_8.location.reload(true);
	else
		LastLoadDate=iDate;
}
function fOnLoadF0(){DspText2();DspText4();}

function fRun(name,fr){
	fr=((fr==null)?"f_8":fr);
	if(name!=null && (window.frames[fr]) && eval("window.frames[fr]."+((name.indexOf("(")>=0)?name.substring(0,name.indexOf("(")):name))){
		onerror=function(msg,url,lno) {return true;}
		if((window.frames[fr]) && eval("window.frames[fr]."+((name.indexOf("(")>=0)?name.substring(0,name.indexOf("(")):name)))
			window.frames[fr].onerror=function(msg,url,lno) {return true;}
		if((window.frames[fr]) && eval("window.frames[fr]."+((name.indexOf("(")>=0)?name.substring(0,name.indexOf("(")):name)))
			eval("window.frames[fr]."+name+((name.indexOf("(")<0)?"()":""));
		if((window.frames[fr]) && eval("window.frames[fr]."+((name.indexOf("(")>=0)?name.substring(0,name.indexOf("(")):name)))
			window.frames[fr].onerror=null;
		onerror=null;
	}
	return false;
}
//<!--- #36161 --->
function ChangeLanguage(newLang){
  top.fOpenChangeLangMenu(false);
  top.GoToLocation("langChooser","changeLanguage","locale="+newLang+"&RepaintAllFrames=1&"+ClientURLToken+"&NextUrl="+escape(window.f_8.location.href),"","");//<!--- #38730 / --->
	//window.f_8.location.href="index.cfm?fuseaction=langChooser.changeLanguage&locale="+newLang+"&RepaintAllFrames=1&"+ClientURLToken+"&NextUrl="+escape(window.f_8.location.href); // #35528/ //<!--- #38730 / --->
	return false;
}
//<!--- /#36161 --->
function removeHTMLTags(strInputCode){
 	strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
	 	return (p1 == "lt")? "<" : ">";
	});
	var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
  return strTagStrippedText;
}

function removeHTMLTagsFromForm(formID){
  removeHTMLTagsFromForm1(formID,'f_8');
}

function removeHTMLTagsFromForm1(formID, FrameID){
  if(FrameID != "")
    mainFormDocument = parent.frames[FrameID].document;
  else
    mainFormDocument = document;
  for (var i = 0; i<mainFormDocument.getElementById(formID).elements.length; i++)
      if ((mainFormDocument.getElementById(formID).elements[i].type == 'text') || (mainFormDocument.getElementById(formID).elements[i].type == 'textarea'))
            mainFormDocument.getElementById(formID).elements[i].value = removeHTMLTags(mainFormDocument.getElementById(formID).elements[i].value)
}
function hiddenPost(docID, action) {
  if (docID.body==null) {
    docID.write('<body></body>');
    docID.close();
  }
  var formID = docID.createElement("form");
  docID.body.appendChild(formID);

  for (i=2; i<arguments.length; i+=2) {
    var input = docID.createElement("input");
    input.type="hidden";
    input.id=arguments[i];
    input.name=arguments[i];
    input.value=arguments[i+1];
    formID.appendChild(input);
  }

  formID.action = action;
  formID.method = "POST"
  formID.submit();
}
function fCountryDelayed()
{
  if (top.is.ie)
    fCountry();
  else
    window.setTimeout("fCountry()", 500);
}

//<!--- #37001 --->
function fLoginAsOriginalUser() {
  if (typeof(originalUserID) != "undefined") {
    hiddenPost(document, "index.cfm?fuseAction=SystemMaintenance.LoginAsUser&LoginByAdmin=true&" + ClientURLToken, "userID", originalUserID);
  }
}
//<!--- /#37001 --->
