﻿
        function showFocused(el){
            var e = document.getElementById(el);
            e.className = "mFocused";
        }
        
        function showOver(el){
            var e = document.getElementById(el);
            e.className = "mOver";
        }
        
        function showDefault(el){
            var e = document.getElementById(el);
            e.className = "default";
           
        }
        function maximizeWindow() 
        {
            var offset = (navigator.userAgent.indexOf("Mac") != -1 || 
                navigator.userAgent.indexOf("Gecko") != -1 || 
				navigator.appName.indexOf("Netscape") != -1) ? 0 : 4;
			    window.moveTo(-offset, -offset);
			    window.resizeTo(screen.availWidth + (2 * offset), 
				screen.availHeight + (2 * offset));
				window.status = "Quatation Management System";
        }
        	
        function IClickDetail(idPnl,idImage,urlImageUp,urlImageDown)
        {
            if(document.getElementById(idPnl).style.display=='none')
            {
                document.getElementById(idPnl).style.display = 'block';
                document.getElementById(idImage).src = urlImageDown;
            }
            else
            {
                document.getElementById(idPnl).style.display = 'none';
                document.getElementById(idImage).src = urlImageUp;
            }
        }
        function logout()
        {
	        ht = document.getElementsByTagName("html");
	        ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
	        if (confirm('Are you sure you want to log out?'))
	        {
		        return true;
	        }
	        else
	        {
		        ht[0].style.filter = "";
		        return false;
	        }
        }
        function SetTitle()
        {
            document.title = "Web seven catalog service administrator";         
        }
        function ALD_GetLoader()
        {
	        return document.getElementById("waitDiv");
        }

        function ALD_HideLoader()
        {
            //alert("unLoad");
	        ALD_GetLoader().style.visibility = 'hidden';
	        ALD_GetLoader().style.display = 'none';
	        ALD_GetLoader().style.zIndex = -10000;
        }

        function ALD_ShowLoader()
        {
            //alert("Load");
	        ALD_GetLoader().style.visibility = 'visible';
	        ALD_GetLoader().style.display = 'block';
	        ALD_GetLoader().style.zIndex = 500;
        }
        
        function LoadWaiting()
        {
            ALD_ShowLoader();
            if (window.addEventListener){ 
	            window.addEventListener("load", ALD_HideLoader, false) 
            } else if (window.attachevent) { 
	            window.attachevent("onload", ALD_HideLoader) 
            } else { 
	            window.onload=ALD_HideLoader 
            }
        }
        function setFocus(idControl){
            document.getElementById(idControl).focus();
        }
	

