	
	window.ondom = function(fn){
        window.__ondom_functionArray.push(fn);
    };
    (function(){
        window.__ondom_functionArray = [];
        function _runFunctions(){
            for (var i in window.__ondom_functionArray){
                (window.__ondom_functionArray[i])();
            }
        };
        var _khtml = /(WebKit|khtml)/i.test(navigator.userAgent);
        if(document.addEventListener && !_khtml){
            document.addEventListener("DOMContentLoaded", _runFunctions, false);
        }else if(_khtml){
            var _timer = setInterval(function(){
                if(/loaded|complete/.test(document.readyState)){
                    clearInterval(_timer);
                    _runFunctions();
                }
            }, 10);
        }else{
            document.write("<script id=__ie_ondom defer src=javascript:void(0)><\/script>");
            var script = document.getElementById("__ie_ondom");
            script.onreadystatechange = function(){
                if(this.readyState == "complete"){
                    _runFunctions();
                }
            };
        }
    })();
	
	//
		
	window.onload = function()
	{
		if (typeof onloadLoader == "function") onloadLoader();
		
		fixIE6CSSManyClass();
		
		// begin *** search box
		
		var searchForm = document.search;
		
		var searchFormInput = searchForm.getElementsByTagName("input")[0];
		var searchFormBtn = searchForm.getElementsByTagName("a")[0];
		var defaultSearchFormValue = searchFormInput.value;
		
		searchFormInput.onfocus = function ()
		{
			this.value = "";
		}
		
		searchFormInput.onblur = function ()
		{
			if (this.value == "") this.value = defaultSearchFormValue;
		}
		
		searchFormBtn.onclick = function ()
		{
			if (searchFormInput.value == defaultSearchFormValue) searchFormInput.value = "";
			searchForm.submit();
			return false;
		}
		
		// end *** 
	}
	
	//
	
	function toggleItemsUnderSectionMenu(aItem, ulLevelId)
	{
	
		if (document.getElementById(ulLevelId) == null) return true;
	
		parentNodeItemsLevel = document.getElementById(ulLevelId).parentNode;
		classParentNodeItemsLevel = getClassAttribute(parentNodeItemsLevel);
		
		documentLocation = document.location.href.indexOf("#") != -1 ? document.location.href.substring(0, document.location.href.indexOf("#")) : document.location.href;
		
		if (documentLocation != aItem.href && aItem.href.match(/.*\#$/) == null)
		{
			return true;
		}
		
		if (classParentNodeItemsLevel.indexOf('selected') != -1)
		{
			setClassAttribute(parentNodeItemsLevel, classParentNodeItemsLevel.replace(/\bselected\b/g, ''));
			document.getElementById(ulLevelId).style.display = "none";
		}
		else
		{
			var navUl = document.getElementById("section-menu-items").getElementsByTagName('ul');
			for (var i=0; i<navUl.length; i++)
			{
				if (navUl[i].id.match(/^section-menu-[0-9]{1,2}-[0-9]{1,2}$/))
				{
					anothersParentNodeItemsLevel = document.getElementById(navUl[i].id).parentNode;
					anothersClassParentNodeItemsLevel = getClassAttribute(anothersParentNodeItemsLevel)
					setClassAttribute(anothersParentNodeItemsLevel, anothersClassParentNodeItemsLevel.replace(/\bselected\b/g, ''));
					document.getElementById(navUl[i].id).style.display = "none";
				}
			}
			
			document.getElementById(ulLevelId).style.display = "block";
			setClassAttribute(parentNodeItemsLevel, classParentNodeItemsLevel + " selected");
		}
		
		if (!aItem.href.match(/.*\#$/) && classParentNodeItemsLevel.indexOf('selected') == -1 && classParentNodeItemsLevel.indexOf('opened') == -1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	
	function setClassAttribute(elem, valueAttr)
	{
		navigator.userAgent.indexOf('MSIE') != -1 ? elem.setAttribute("className", valueAttr) : elem.setAttribute("class", valueAttr);
	}
	
	function getClassAttribute(elem)
	{
		classValue = navigator.userAgent.indexOf('MSIE') != -1 ? elem.getAttribute("className") : elem.getAttribute("class");
		return classValue != null ? classValue : "";
	}
	
	//

	function showHideStaff(id, state)
	{
		if (state == 'show')
		{
			document.getElementById(id).style.display = 'block';
			document.getElementById(id + 'link').style.display = 'none';
		}
		else
		{
			document.getElementById(id).style.display = 'none';
			document.getElementById(id + 'link').style.display = 'block';
		}
	}

	var state = new Object();

	//

	function getDownloadTime(selection, filesize)
	{
		var bandwirdhOption = selection.options[selection.selectedIndex].value;
		var tagDownloadTime = document.getElementById("download-time");
		var downloadTime;

		if (bandwirdhOption == "0")
		{
			tagDownloadTime.innerHTML = "-";
		}
		else if (bandwirdhOption != 0)
		{
			downloadTime = (filesize/1024) / (bandwirdhOption/8);
			
			if (downloadTime > 119)
			{
				downloadTime = parseInt(downloadTime / 60) + " min";
			}
			else
			{
				downloadTime = parseInt(downloadTime) + " sec";
			}
			
			tagDownloadTime.innerHTML = "&nbsp;<strong>" + downloadTime + "</strong>";
		}
	}
	
	function openNewWindowForStaffProfile(membername, profiledata, pathname)
	{
		var profileWin = window.open("","teamprofile","width=" + 600 + ",height=" + 310 + "status=no,toolbar=no,menubar=no");
		var output = "";
		profileWin.document.open();
			output += '<html>';
			output += '<head>';
			output += 	'<title>' + membername + '</title>';
			output += 	'<style type="text/css">';
			output += 		'body {margin: 0px; padding: 0px;}';
			output += 		'h1 {margin: 0px; padding: 0px; display: inline; font-size: 14px; line-height: 30px;}';
			output += 		'div.profile-data {padding: 20px 20px 0px 40; color: #00573d; font-size: 11px; font-family: Arial, Helvetica, sans-serif;)';
			output += 	'</style>';
			output += '</head>';
			output += '<body>';
			output += 	'<table width="600" height="310" border="0">';
			output += 		'<tr>';
			output += 			'<td height="93" background="/_design/about-us/bg-popup-profile.jpg">';
			output += 				'<table width="100%" height="310"  border="0">';
			output += 					'<tr>';
			output += 						'<td width="65%" height="21"><img src="/_photos/_global/staff/' + pathname + '-tag.jpg" width="163" height="25"></td>';
			output += 						'<td width="35%" rowspan="2" valign="top">';
			output += 							'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="203" height="222">';
			output += 								'<param name="movie" value="/_photos/_global/staff/' + pathname + '.swf">';
			output += 								'<param name="quality" value="high">';
			output += 								'<embed src="/_photos/_global/staff/' + pathname + '.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="203" height="222" />';
			output += 							'</object></td>';
			output += 					'</tr>';
			output += 					'<tr>';
			output += 						'<td valign="top">';
			output += 							'<div class="profile-data">';
			output += profiledata;
			output += 							'</div>';
			output += 						'</td>';
			output += 					'</tr>';
			output += 					'<tr>';
			output += 						'<td>&nbsp;</td>';
			output += 						'<td>&nbsp;</td>';
			output += 					'</tr>';
			output += 				'</table></td>';
			output +=		'</tr>';
			output += 	'</table>';
			output += '</body>';
			output += '</html>';
		profileWin.document.write(output);
		profileWin.document.close();
	}
	
	fixIE6CSSManyClass = function()
	{
		if (navigator.userAgent.indexOf("MSIE 6") != -1)
		{
			if (sectionMenu = document.getElementById("section-menu-items"))
			{
				var navL1Items = sectionMenu.getElementsByTagName('li');
				
				for (var item in navL1Items)
				{
					if (typeof navL1Items[item] == "object")
					{
						navL1Items[item].className = navL1Items[item].className.indexOf("selected-without-childrens") != -1 && navL1Items[item].className.indexOf("two-rows") != -1 ? navL1Items[item].className.replace("selected-without-childrens", "selected-without-childrens-two-rows") : navL1Items[item].className;
					}
				}
			}
		}
	}

	//



