var boolChangeTemplate = false, arrZoom = ['75%', '87%', '100%','125%', '150%', '200%'], intZoomIndexPortal = typeof (getCookie ('intZoomIndexPortal ')) != 'undefined' ? getCookie ('intZoomIndexPortal') : 2;
var arrCommParents = new Array (), arrULCount = new Array (), intULCount = 0, boolTemplateChangeVisible = false, strDBPortal = '/dm_vulcan/portal.nsf/', strPathPortal = '/dm_vulcan/';
function trim(str) {
// Remove the leading and ending spaces
	try {
		re = /^ *| *$/gi;
		return str.replace(re, '');
	} catch (e) {return '';}
}
function getEl (strID, objParent) {
	// identifica obiectul HTML cu id-ul corespunzator
	if (typeof (objParent) == 'undefined')
		objParent = document;
	
	return objParent.getElementById (strID);
}
function getIndexOf (array, strToComp, boolPartialMatch, intOffset) {
	// returneaza index-ul pe care se regaseste elementul strToComp in vectorul array
	intOffset = (intOffset == null ? 0 : intOffset);
	if (array == null || typeof (array) == 'undefined' || strToComp == null || typeof (strToComp) == 'undefined') return -1;
	for (i = 0; i < array.length; i++)
		if (array [i].toLowerCase ().indexOf (strToComp.toLowerCase ()) == 0)
			if (boolPartialMatch || !boolPartialMatch && array [i].length == strToComp.length)
				return i + (array [i].length == strToComp.length ? intOffset : 0);
	return -1;
}
function strLeft (strString, strSubString) {
	// Returneaza ce este in stanga string-ului strSubstring din string-ul strString
	var intPos;
	if ((intPos = strString.indexOf (strSubString)) >= 0)
		return strString.substring (0, intPos);
	return strString;
}
function strLeftBack (strString, strSubString) {
	// Returneaza ce este in stanga string-ului strSubstring din string-ul strString
	var intPos;
	if ((intPos = strString.lastIndexOf (strSubString)) >= 0)
		return strString.substring (0, intPos);
	return strString;
}
function strRight (strString, strSubString) {
	// Returneaza ce este in stanga string-ului strSubstring din string-ul strString
	var intPos;
	if ((intPos = strString.indexOf (strSubString)) >= 0)
		return strString.substring (intPos + strSubString.length);
	return '';
}
function strRightBack (strString, strSubString) {
	// Returneaza ce este in stanga string-ului strSubstring din string-ul strString
	var intPos;
	if ((intPos = strString.lastIndexOf (strSubString)) >= 0)
		return strString.substring (intPos + strSubString.length);
	return '';
}
function appendClass (oElem, strClass) {
	// functie care adauga, pentru elementul oElem, clasa strClass
	if (oElem.className.indexOf (strClass) < 0)
		oElem.className += ' ' + strClass;
}
function insertClass (oElem, strClass) {
	// functie care insereaza, pentru elementul oElem, clasa strClass
	if (oElem.className.indexOf (strClass) < 0)
		oElem.className = strClass + ' ' + trim (oElem.className);
}
function removeClass (oElem, strClass) {
	// functie care elimina, pentru elementul oElem, clasa strClass
	oElem.className = trim (oElem.className.replace (new RegExp (strClass, 'g'), '').replace (/\s\s/g, ''));
}
function addEvListener (objElem, strEvent, objFunction) {
	// pentru obiectul objElem, ataseaza functia objFunction la evenimentul strEvent
	if (objElem.attachEvent)
		objElem.attachEvent (strEvent, objFunction);
	else if (objElem.addEventListener)
		objElem.addEventListener (strEvent.replace (/^on/g, ''), objFunction, false);
	else
		eval ('objElem.' + strEvent + ' = ' + objFunction);
}
function rtclickcheck (keyp) {
	// dezactivare click dreapta
	if (navigator.appName == "Netscape" && keyp.which == 3) {
		return false;
	}
	if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {
		return false;
	}
}
function getCookieVal (offset) { 
	// used in getCookie function
	var endstr = document.cookie.indexOf (";", offset); 
	if (endstr == -1){ 
		endstr = document.cookie.length; 
	}
	return unescape (document.cookie.substring(offset, endstr));
}
function getCookie (name) {
	// retrieve the specified Cookie
	var arg = name + "=", argNull = name + ";"; 
	var alen = arg.length; 
	var clen = document.cookie.length;
	var i = 0; 
	while (i < clen) { 
		var j = i + alen; 
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf (" ", i) + 1;
		if (i == 0) break;
	} 
	return null; 
} 
function setTopDomainCookie (name, value) {
	// set a volatile Cookie
	var argv = setTopDomainCookie.arguments; 
	var argc = setTopDomainCookie.arguments.length; 
	var expires = (argc > 2) ? argv[2] : null; 
	var path = '/'; 
	var domain = (argc > 4) ? argv[4] : null; 
	var secure = (argc > 5) ? argv[5] : false; 
	document.cookie = name + "=" + trim(escape (value)) + ((expires == null || expires == "") ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); 
}
function setCookie (name, value, path) {
	// set a volatile Cookie
	var argv = setCookie.arguments; 
	var argc = setCookie.arguments.length; 
	var expires = (argc > 2) ? argv[2] : null; 
	var path = (argc > 3) ? argv[3] : null; 
	var domain = (argc > 4) ? argv[4] : null; 
	var secure = (argc > 5) ? argv[5] : false; 
	document.cookie = name + "=" + trim(escape (value)) + ((expires == null || expires == "") ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); 
} 
function setCookiePermanent (name, value) { 
	// set a permanent Cookie
	var argv = setCookiePermanent.arguments; 
	var argc = setCookiePermanent.arguments.length; 
	var path = '/;'; 
	var expires = new Date("December 31, 2051"); 
	var domain = (argc > 4) ? argv[4] : null; 
	var secure = (argc > 5) ? argv[5] : false; 
	document.cookie = name + "=" + trim(escape (value)) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); 
} 
function deleteCookie (name, path, domain ) {
	document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function addEvListener (objElem, strEvent, objFunction) {
	// pentru obiectul objElem, ataseaza functia objFunction la evenimentul strEvent
	if (objElem.attachEvent)
		objElem.attachEvent (strEvent, objFunction);
	else if (objElem.addEventListener)
		objElem.addEventListener (strEvent.replace (/^on/g, ''), objFunction, false);
	else
		eval ('objElem.' + strEvent + ' = ' + objFunction);
}
function removeEvListener (objElem, strEvent, objFunction) {
	// pentru obiectul objElem, elimina functia objFunction de la evenimentul strEvent
	if (objElem.detachEvent)
		objElem.detachEvent (strEvent, objFunction);
	else if (objElem.removeEventListener)
		objElem.removeEventListener (strEvent.replace (/^on/g, ''), objFunction, false);
	else
		eval ('objElem.' + strEvent + ' = null');
}
function switchLang (strLang, strUrl) {
	var strPath = '/' + strLeft (strRight (strRight (location.href, '://'), '/'), 'portal.nsf');
	setCookie ('Language', strLang, null, strPath);
	
	if (typeof (strUrl) == 'undefined')
		location.reload (true);
	else
		location.href = strUrl;
}
function removeNoDocFound (strId) {
	var obj = getEl (strId);
	if (obj)
		if (obj.innerHTML.toLowerCase ().indexOf ('<h2>no documents found</h2>') >= 0)
			obj.innerHTML = '';
}
function authenticate (strUser, strPassword) {
	if (typeof (strUser) != 'undefined' && typeof (strPassword) != 'undefined')
		location.href = '/names.nsf?Login&Username=' + strUser + '&Password=' + strPassword + '&RedirectTo=' + location.pathname.substring (0, location.pathname.indexOf ('.nsf') + 4) + '/instRedirect';
	else {
		location.href = '/names.nsf?Logout&RedirectTo=' + location.pathname.substring (0, location.pathname.indexOf ('.nsf') + 4);
	}
	return false;
}
/* ---------- ICONS ---------- */
function addToFavorites () {
	title = document.title;
	url = location.href;
	if (window.sidebar) {
		// Mozilla Firefox Bookmark
		window.sidebar.addPanel (title, url, "");
	} else if (window.external) {
		// IE Favorite
		window.external.AddFavorite (url, title);
	} else if (window.opera && window.print) {
		// Opera Hotlist
		return true;
	}
}
function setWebMail (objThis) {
	location.href = 'mailto:mail@domeniu.ro';
}
function printPage () {
	window.open ('/dm_vulcan/portal.nsf/AllForPrint/' + document.forms [0].DocUNID.value + location.search);
}
function editPage () {
	window.open ('/dm_vulcan/portal.nsf/0/' + document.forms [0].DocUNID.value + '?EditDocument');
}
/* ---------- Menu, themes, attachments ---------- */
function docWrite (intCrtSection) {	
	document.write ('</div></div><div id="menuSection' + (intCrtSection) + '" class="menuSection' + (intCrtSection) + '"><div>');
}
function toggleControlPanel () {
	startAnim (getEl ('portletChangeTemplate'), 'slide');
	boolTemplateChangeVisible = !boolTemplateChangeVisible;
	var objDiv = document.getElementById ('portletChangeTemplate');
	if (objDiv) {
		setTimeout ("document.getElementById ('portletChangeTemplate').className = 'portlet portletChangeTemplate' + (boolTemplateChangeVisible ? 'Visible' : 'Hidden')", 250);
	}
}
function deleteFromQueryString (strQueryString, strParam) {
	var regExp = new RegExp ('&' + strParam + '=[^\&]*');
	return strQueryString.replace (regExp, '');
}
function selectTemplate (strVal) {
	setCookie ('ActiveTemplate', strVal, null, strPathPortal);
	setCookie ('ActiveTemplate', strVal, null, '/');
	location.href = deleteFromQueryString (location.href, 'AT');
}
function selectTheme (strVal) {
	setCookie ('ThemeColor', strVal, null,  strPathPortal);
	setCookie ('ThemeColor', strVal, null,  '/');
	location.href = deleteFromQueryString (location.href, 'AT');
}
function selectSize (strVal) {
	setCookie ('ThemeSize', strVal, null,  strPathPortal);
	setCookie ('ThemeSize', strVal, null,  '/');
	location.href = deleteFromQueryString (location.href, 'AT');
}
function selectPosition (strVal) {
	setCookie ('ThemePosition', strVal, null,  strPathPortal);
	setCookie ('ThemePosition', strVal, null,  '/');
	location.href = deleteFromQueryString (location.href, 'AT');
}
function resetTheme () {
	deleteCookie ('ActiveTemplate', strPathPortal);
	deleteCookie ('ActiveTemplate', '/');
	deleteCookie ('ActiveTemplate');
	deleteCookie ('ThemeColor', strPathPortal);
	deleteCookie ('ThemeColor', '/');
	deleteCookie ('ThemeColor');
	deleteCookie ('ThemeSize', strPathPortal);
	deleteCookie ('ThemeSize', '/');
	deleteCookie ('ThemeSize');
	deleteCookie ('ThemePosition', strPathPortal);
	deleteCookie ('ThemePosition', '/');
	deleteCookie ('ThemePosition');
	location.href = deleteFromQueryString (location.href, 'AT');
}
/* ---------- Layout ---------- */
function correctWidth () {
	var objCont = getEl ('container'), objLayoutCont = getEl ('layoutContainer');
	var objMiddleCell = getEl ('middleContainer'), opMain = getEl ('portletMain');
	var strText, intWidth, intActualWidth;
	if (objCont && objLayoutCont && objMiddleCell && opMain) {
		intWidth = objCont.offsetWidth;
		intActualWidth = Math.max (objCont.scrollWidth, objLayoutCont.scrollWidth);
		if (intActualWidth - intWidth > 0) {
			for (var i = 0; i < objMiddleCell.childNodes.length; i++) {
				try {objMiddleCell.childNodes [i].style.width = objMiddleCell.childNodes [i].scrollWidth - (intActualWidth - intWidth) + 'px';} catch (e) {}
			}
			opMain.style.overflow = 'auto';
			opMain.style.width = (opMain.offsetWidth - 22) + 'px';
		}
	}
	try {
		getEl ('portletMain').style.fontSize = arrZoom [intZoomIndexPortal];
	} catch (e) {}
}
function printPage () {
	var strUrl = location.href.replace (/AllByUNID/g, 'AllForPrint');
	if (strUrl.indexOf ('AllForPrint') >= 0)
		window.open (strUrl);
}
function zoomIn () {
	if (intZoomIndexPortal < arrZoom.length - 1) {
		getEl ('portletMain').style.fontSize = arrZoom [++intZoomIndexPortal];
		setCookiePermanent ('intZoomIndexPortal', intZoomIndexPortal);
	}
}
function zoomOut () {
	if (intZoomIndexPortal > 0) {
		getEl ('portletMain').style.fontSize = arrZoom [--intZoomIndexPortal];
		setCookiePermanent ('intZoomIndexPortal', intZoomIndexPortal);
	}
}
function resizeAllIframes () {
	var allIframes = document.getElementsByTagName ('iframe'), i;
	for (i = 0; i < allIframes.length; i++) {
		/*if (isFF && allIframes [i].getAttribute ('src') != null)
			allIframes [i].style.height = '1px';*/
		try {allIframes [i].style.height = allIframes [i].contentWindow.document.documentElement.scrollHeight + 'px';} catch (e) {}
	}
	if (typeof (intInterval) == 'undefined') {
		intInterval = setInterval ('resizeAllIframes ()', 250);
	}
}
function showProgress () {
	initialOverflow = typeof (getComputedStyle) != 'undefined' ? getComputedStyle (document.body, '').getPropertyValue ('overflow') : document.body.currentStyle.overflow;
	document.body.style.overflow = 'hidden';
	objDivFill = document.createElement ('div');
	objDivFill.className = 'x-body-wrap';
	objDivFill.style.top = 0;
	objDivFill.style.height = Math.max (document.body.scrollHeight, document.body.clientHeight, document.body.offsetHeight);
	document.body.insertBefore (objDivFill, document.body.childNodes [0]);
	document.forms [0].className = "x-no-select";
}
function removeProgress () {
	document.body.style.overflow = initialOverflow;
	objDivFill.parentNode.removeChild (objDivFill);
	document.forms [0].className = '';
}
function discardElement (element) {
	var garbageBin = getEl ('IELeakGarbageBin');
	if (!garbageBin) { 
		garbageBin = document.createElement ('DIV'); 
		garbageBin.id = 'IELeakGarbageBin'; 
		garbageBin.style.display = 'none'; 
		if (document.forms [0])
			document.forms [0].appendChild (garbageBin);
		else
			document.body.appendChild (garbageBin); 
	} 
	// move the element to the garbage bin 
	garbageBin.appendChild(element); 
	garbageBin.innerHTML = ''; 
}
function findXPos (obj) {
	var intPos = obj.offsetLeft;
	while ((obj = obj.offsetParent))
		if (!isNaN (obj.offsetLeft))
			intPos += obj.offsetLeft;
	return intPos;
}
function findYPos (obj) {
	var intPos = obj.offsetTop;
	while ((obj = obj.offsetParent)) {
		if (!isNaN (obj.offsetTop))
			intPos += obj.offsetTop;
	}
	return intPos;
}
function mailTo (strMailTo, strSubject, strBody, e) {
	var objAHref = e.target ? e.target : e.srcElement;
	objAHref.setAttribute ('href', 'mailTo:' + strMailTo + '?subject=' + strSubject + '&body=' + strBody);
	objAHref.click ();
}
function changeLanguage (strIndex) {
	// functie care schimba valoarea cookie-ului pentru limba
	var strPath = document.forms [0].InstalledPath.value;
	if (document.forms [0].IerarhieTX.value.toLowerCase ().indexOf ('sobis turism') == 0 && strIndex == '2')
		location.href = '/portal/company/turism_de/portal.nsf/Index/100?OpenDocument&Lang=2';
	else {
		setCookie ('Language', strIndex, '', '/' + strPath + '/');
		location.reload (true);
	}
}
/* ---------- Cautare ---------- */
function searchPortal (strName) {
	// functie care efectueaza cautarea, tinand cont de parametri selectati
	var f = document.forms [0];
	var strSearch = new Array ();
	var strCount = '10', strSortOrder = 'SearchOrder=', strAprox = 'SearchWV=';
	
	if (strName != null && strName != "")
		strSearch = eval ('document.getElementById (\'' + strName + '\').value');
	else if (f.txtCautare && f.txtCautare.value != "")
		strSearch = f.txtCautare.value;
	else if (f.txtCautareTop && f.txtCautareTop.value != "")
		strSearch = f.txtCautareTop.value;
	else if (f.txtCautareRight && f.txtCautareRight.value != "")
		strSearch = f.txtCautareRight.value;
	if (strName == 'txtCautare') {
		var strTmp = new Array ();
		if (f.TipCautare[2].checked)
			strTmp[0] = strSearch;
		else
			strTmp = strSearch.split (' ');
		var strOp = f.TipCautare[0].checked ? f.TipCautare[0].value : f.TipCautare[1].value;
		var strFields = new Array ();
		for (i = 0; i < f.Campuri.length; i++)
			if (f.Campuri[i].checked)
				strFields [strFields.length] = f.Campuri[i].value;
		if (strFields.length == 0)
			strFields[0]='';
		strSearch = '';
		for (i = 0; i < strTmp.length; i++)
			for (j = 0; j < strFields.length; j++) {
				strSearch += '(';
				if (strFields[j] != '')
					strSearch += '[' + strFields[j] + ']=';
				strSearch += strTmp[i] + ')' + strOp;
			}
		if (strSearch.length > strOp.length)
			strSearch = strSearch.substring (0, strSearch.length - strOp.length);
		strSearch = '(' + strSearch + ')';
		strCount = f.RanduriPagina.options [f.RanduriPagina.selectedIndex].text;
	}
	try {strSortOrder += f.TipSortare [0].checked ? '1' : '4';} catch (e) {strSortOrder += '1'};
	try {strAprox += f.SearchWV.checked ? 'TRUE' : 'FALSE';} catch (e) {strAprox += 'TRUE'}
	window.location.href = strDBPortal + '/SearchByDenumire?SearchView&Query=' + strSearch + '&Start=1&Count=' + strCount + '&' + strSortOrder + '&' + strAprox;// + '&RedirectTo=/' + strInstalledPath + '/Stiri.nsf/SearchByDenumire?SearchView|Query=' + strSearch + '|Start=1|Count=' + strCount + '|' + strSortOrder + '|' + strAprox;
}
/* ---------- Stiri, comentarii ---------- */
function outputLink (strLink, strHTMLAttributes) {
	document.write ('<a href="' + strLink.replace (/\[THISUNID\]/g, strUNID) + '" ' + strHTMLAttributes + '>');
}
function showComments (e, strLink) {
	var objAHref = e.target ? e.target : e.srcElement;
	var objIframe = getEl ('ifrAddComment');
	if (objIframe) discardElement (objIframe);
	objIframe = document.createElement ('iframe');
	objIframe.id = 'ifrAddComment';
	objIframe.className = 'noBorder width100';
	objIframe.setAttribute ('frameborder', '0');
	objIframe.setAttribute ('scrolling', 'no');
	objIframe.src = strLink + '&AT=' + document.forms [0].ActiveTemplate.value;
	if (typeof (objAHref.nextSibling) == 'undefined') {
		objAHref.parentNode.appendChild (objIframe);
	} else {
		objAHref.parentNode.insertBefore (objIframe, objAHref.nextSibling);
	}
	objIframe.style.display = 'block';
}
function indentComments (strUNID, boolUseDifferentClass) {
	var intIndex = getIndexOf (arrCommParents, strUNID);
	if (arrCommParents.length == 0) {
		document.write ('<ul' + (boolUseDifferentClass ? (' class="listLevel' + intULCount + '"') : '') + '>');
		intULCount++;
		arrCommParents.push (strUNID);
		arrULCount.push (intULCount);
	} else if (intIndex >= 0) {
		if (intIndex != arrCommParents.length - 1) {
			for (var i = 0; i < intULCount - arrULCount [intIndex]; i++)
				document.write ('</' + 'ul>');
			intULCount = arrULCount [intIndex];
		}
	} else {
		document.write ('<ul' + (boolUseDifferentClass ? (' class="listLevel' + intULCount + '"') : '') + '>');
		intULCount++;
		arrCommParents.push (strUNID);
		arrULCount.push (intULCount);
	}
}
/* ---------- Curs valutar, vreme ---------- */
function isInArray (arr, strString) {
	var i;
	for (i = 0; i < arr.length; i++)
		if (arr [i] == strString)
			return i;
	return -1;
}
function parseTag (strText, strTag) {
	strText = strText.replace (/\n/g, '');
	//var regExp = new RegExp ('((.*)\<' + strTag + '\>)|(\<\/' + strTag + '\>(.*))', 'gi');
	strRet = strText.split ('<' +  strTag + '>') [1];
	strRet = strRet.split ('</' +  strTag + '>') [0];
	return strRet;
}
function ajaxGetCurrency (urlName, strID) {
	var xmlHttp = initAJAXObj ();
	var strHeaderType = 'application/rss+xml';
	xmlHttp.open ('GET', urlName, true);
	xmlHttp.onreadystatechange = function () {
		try {
			if (xmlHttp.readyState == 4) {
				var response = xmlHttp.responseText, strTitle = '', strReturn = '';
				strTitle = response.split ('<title>');
				strTitle = strTitle [1].split ('</title>') [0];
				response = response.substring (response.indexOf ('<item>') + 6);
				response = response.split ('</item><item>');
				for (i = 0; i < response.length; i++) {
					strCurrency = parseTag (response [i], 'title');
					if (isInArray (arrCurrency, strCurrency ) >= 0)
						strReturn += '<span class="currency">1 ' + strCurrency + '</span> = ' + parseTag (response [i], 'description') + ' lei<br>';
				}
				document.getElementById (strID).innerHTML = strReturn;
			}
		} catch(e){
			window.status=i + ' Error at function callback_updateChoices on field : '+e.description+ ' at line '+e.line;
			return null;
		}
	}
	xmlHttp.send(null);
}
function ajaxGetWeather (urlName, strID, intIndex) {
	var xmlHttp = initAJAXObj ();
	callback_updateChoices=function () {
		try {
			if (xmlHttp.readyState == 4) {
				var response = xmlHttp.responseText, strTitle = '', strReturn = '';
 				strTitle = response.split ('<title>');
				strTitle = strTitle [1].split ('</title>') [0];
				response = response.split ('![CDATA') [intIndex];
				strReturn = response.substring (0, response.indexOf (']'));
				document.getElementById (strID).innerHTML = '<p class=title>' + strTitle + '</p>' + strReturn;
			}
		} catch(e){
			window.status=i + ' Error at function callback_updateChoices on field : '+e.description+ ' at line '+e.line;
			return null;
		}
	}
	xmlHttp.open ("GET", urlName, true);
	if (xmlHttp.addEventListener) {
		xmlHttp.addEventListener ('load', callback_updateChoices, false);
	}
	else
		xmlHttp.onreadystatechange=callback_updateChoices;
	xmlHttp.send(null);
}
function ajaxGetTraffic (strIDVisits, strIDTopPages) {
	var xmlHttp = initAJAXObj ();
	callback_updateTraffic=function () {
		try {
			if (xmlHttp.readyState == 4) {
				//document.getElementById (strID).innerHTML = xmlHttp.responseText;
				var response = eval ('(' + xmlHttp.responseText + ')');
				objDivVisits = document.getElementById (strIDVisits);
				if (objDivVisits) {
					objDivVisits.innerHTML = '<span class="value">' + response [0]["ga:visitors"] + '</span> vizitatori unici, <span class="value">' + response [0]["ga:visits"] + '</span>&nbsp;accesari';
				}
				objDivTopPages = document.getElementById (strIDTopPages);
				if (objDivTopPages) {
					var arrPages = response [1], strHTML = '', intCount = 0;
					for (var i = 0; i < arrPages.length && intCount < 10; i++) {
						if (arrPages [i][0] != '') {
							intCount++;
							strHTML += '<a class="menuLevel2" href="' + arrPages [i][2] + '" title="' + arrPages [i][1] + '">' + arrPages [i][0] + "</a><br>";
						}
					}
				}
				objDivTopPages.innerHTML = strHTML;
			}
		} catch(e){
			window.status=i + ' Error at function callback_updateChoices on field : '+e.description+ ' at line '+e.line;
			return null;
		}
	}
	xmlHttp.open ("GET", '/dm_vulcan/portal.nsf/agGetGoogleAnalyticsData?OpenAgent', true);
	xmlHttp.onreadystatechange=callback_updateTraffic;
	xmlHttp.send(null);
}
function initAJAXObj () {
	try {
		xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (e2) {
			xmlHttp = false;
		}
	}
	if (!xmlHttp && typeof XMLHttpRequest != 'undefined')
		xmlHttp = new XMLHttpRequest();
	return xmlHttp;
}



















