/*COMPUTED VARIABLE*/ var DbPath = '/SITE/siteInternet_eng.nsf'; var DefaultView = '(webDocument)'; var DbSitePath = '/SITE/siteInternet_eng.nsf' var DbForumPath ='/site/forum.nsf'; var DbForumDownloadPath ='/site/download.nsf'; var DbSitePathMapping = 'http://www.avanteam.fr/' var DbForumPathMapping ='http://www.avanteam.fr/forum?Open&login'; var DbForumDownloadPathMapping ='http://www.avanteam.fr/download'; function goTo( where ){ if(where == "clientsPortal"){ window.location = "/clients?Open&login"; } if(where == "partnersPortal"){ window.location = "/partners?Open&login"; } if(where == "EnSavoirPlus"){ window.location = "/SITE/siteInternet_eng.nsf/webcontents/1407941639079349,8043906"; } } /*ROLL OVER FUNCTION USE IN NAVIGATOR VIEW */ var RubriqueColorMouseOut ='#FFFFFF'; var RubriqueColorMouseOver = '000080'; function outRubrique(o){ o.style.background = RubriqueColorMouseOut; o.style.color = '#000000'; } function overRubrique(o){ o.style.background = RubriqueColorMouseOver; o.style.color = '#FFFFFF'; } /*LINK LOADER */ function openDocument( key ){ window.location = DbSitePath + '/' + DefaultView + '/' + key + '?Open'; } /*SEARCH FUNCTION */ function catchSubmit(){ if( document.forms.length == 0 ) return; document.forms[0].action="javascript:loadSearch()" //document.forms[0].method="get" } function loadSearch() { var texte = document.getElementById('search').value; if (texte != "") { //texte = ReplaceSubString(texte, "", "+"); //alert(texte); window.location = DbPath+"/vRechercheWeb?SearchView&Count=4999&Query=" + texte+"&"; // window.open(DbPath+"/vRechercheWeb?SearchView&Count=4999&Query=" + texte+"&", "PopupWindow","location=0,toolbar=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=400"); } } /* VIEW FUNCTION */ /////////////////VIEW TOOLS////////////////////// ///////////////////////////////////////////////////////// function doActionClick(sId,isHRef){ var Lnk=null; var sAct=""; if (parent) if (parent.frmBody) if(parent.frmBody.document){ Lnk=parent.frmBody.document.getElementById(sId); if (Lnk){ if (isHRef){ parent.frmBody.location=Lnk.href; }else{ sAct=Lnk.outerHTML; sAct=getDoClickAction(sAct); parent.frmBody._doClick(sAct, this, null); } } } } function ViewPrevious(){ } function ViewPrevious(){ doActionClick("ViewPrevious", false); } function ViewNext(){ doActionClick("ViewNext", false); } function ViewExpand(){ doActionClick("ViewExpand", true); } function ViewCollapse(){ doActionClick("ViewCollapse", true); } function getDoClickAction(sRefHTML){ var sRet=""; sRet = Word(sRefHTML,"_doClick('", 2); sRet = Word(sRet,"'", 1); return sRet; } function setStatus(o,b){ if(b) window.status=o.alt; else window.status=""; //alert("setStatus"); } function Word(ParamIn, Delimiter, Element) { var WordCounter = 1 var Reverse = (Element < 0) var Elem = Math.abs(Element) var StartPos var EndPos var Source = new String(ParamIn) if(Reverse) StartPos = Source.length else StartPos = 0 while (WordCounter <= Elem) { if(Reverse) { EndPos = Source.lastIndexOf(Delimiter, StartPos - 1) if(EndPos >=0) EndPos = EndPos + Delimiter.length } else EndPos = Source.indexOf(Delimiter, StartPos) if(WordCounter == Elem) { if(EndPos >= 0) { return Source.substring(EndPos, StartPos) } else if(Reverse) { return Source.substring(StartPos, 0) } else { return Source.substring(StartPos, Source.length) } } if(EndPos < 0) return "" if(Reverse) StartPos = EndPos - Delimiter.length else StartPos = EndPos + Delimiter.length WordCounter ++ } return "" } function ReplaceSubString(Source, Find, Replace) { var Start = 0 var End = 0 var Result = "" var Source1 = new String(Source) while(End >= 0) { End = Source1.indexOf(Find, Start) if(End >= 0) { if(End > Start) Result = Result + Source1.substring(Start, End) + Replace else Result = Result + Replace } else { Result = Result + Source1.substring(Start, Source1.length) } Start = End + Find.length } return Result } function EncodeURLParam(Parameter) { var Param = Parameter Param = ReplaceSubString(Param, "+", "[Plus]") Param = ReplaceSubString(Param, " ", "+") Param = ReplaceSubString(Param, "&", "[Amp]") Param = ReplaceSubString(Param, '"', "[Quot]") Param = ReplaceSubString(Param, "°", "[Deg]") Param = ReplaceSubString(Param, "#", "[Hash]") return ReplaceSubString(Param, "§", "[Sect]") } function RandomName(Length) { var Number = "" var Pos if(isNaN(Length)) Length = 10 for(Pos = 0; Pos < Length; Pos++) Number += "X" Number = new String(Number + Math.floor((Math.random() * Math.pow(10, Length)))) return Number.substr(Number.length - Length, Length) } /*POPUP FUNCTION */ if (document.all){ var xMax = screen.width, yMax = screen.height; } else if (document.layers){ var xMax = window.outerWidth, yMax = window.outerHeight; } else{ var xMax = 640, yMax=480; } function OpenUrl(Url,Name,Height,Width){ var xOffset = (xMax - Width)/2; var yOffset = (yMax - Height)/2; hwdlOpened=window.open(Url,''+Name+'','width='+Width+',height='+Height+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+''); hwdlOpened.window.focus(); } var re = new RegExp ('%22', 'gi') ; var styleOn = "a"; var styleOff = "b"; var currentStyle = "a"; var appPath = ""; function writeContent(data){ var offerLine = new String(); offerDescription = data.split("|"); offerLine +='