	
	function openloginwindow(dest,title)
	{
		var browserName=navigator.appName;
					var  is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
					//var _windowWidth = 430;
					//var _windowHeight = 194;
					var _windowWidth = 590;
					var _windowHeight = 330;
					var _title = title + "";

					if (browserName=="Netscape" && !is_chrome)
					{
						//_windowWidth = 440;
						//_windowHeight = 190;
						_windowWidth = 590;
						_windowHeight = 330;
					}
					else if (is_chrome)
					{
						//_windowWidth = 440;
						//_windowHeight = 202;
						_windowWidth = 590;
						_windowHeight = 330;
					}
					else
					{
						//_windowWidth = 440;
						//_windowHeight = 197;
						_windowWidth = 590;
						_windowHeight = 330;
					}
		
		if (_title == "undefined") _title = "Login";
		
		return opendhtmlwindow("loginWin","/?fuseaction=signin.login.loginWin&dest="+dest+"&print_preview=1", _title, _windowWidth, _windowHeight, 1, 0, 0);
	}
		
	function opendhtmlwindow(_winname, _url, _title, _width, _height, _center, _resize, _scrolling){
		emailwindow=dhtmlmodal.open(_winname, "iframe", _url, _title, "width="+_width+"px,height="+_height+"px,center="+_center+",resize="+_resize+",scrolling="+_scrolling);
		emailwindow.onclose=function(){return true;};
	} 
	
	function closedhtmlwindow(_winname, action_onclose, dest){
		dhtmlmodal.close(emailwindow,_winname);
		if (action_onclose == "refresh" || action_onclose == "reload") window.location.reload();
		else if (action_onclose == "redirect" && dest != "") window.location.href = dest;
	}
	
	function toggleBottomBarInfo(barIcon, divInfo, theme_color, isTabClick)
	{
		ctrlBarIcon = document.getElementById(barIcon);
		if(!isTabClick)
		{
			isTabClick = false;
		}
		if(ctrlBarIcon)
		{
			var date = new Date();
			date.setMonth(date.getMonth()+1);

			ctrlDivInfo = document.getElementById(divInfo);
			
			if(ctrlBarIcon.attributes.img_pos.value == "up" || !isTabClick)
			{
				ctrlBarIcon.attributes.img_pos.value = "down";
				ctrlBarIcon.src = "/images/bottombar/bar_icon_down" + theme_color + ".jpg";
				ctrlDivInfo.style.display = "none";

				document.cookie = "bottom_bar_status=0; expires=" + date.toUTCString() + ";path=/";
				
				//document.getElementById('bottombar_x').innerText = 'Show';
				document.getElementById('bottombar_x').innerHTML = 'Show';

			}
			else if(ctrlBarIcon.attributes.img_pos.value == "down" && isTabClick)
			{
				ctrlBarIcon.attributes.img_pos.value = "up";
				ctrlBarIcon.src = "/images/bottombar/bar_icon_up" + theme_color + ".jpg";
				ctrlDivInfo.style.display = "block";

				document.cookie = "bottom_bar_status=1; expires=" + date.toUTCString() + ";path=/";
				
				//document.getElementById('bottombar_x').innerText = 'Hide';
				document.getElementById('bottombar_x').innerHTML = 'Hide';
			}
		}
	}  
	
	
