    function HideSPAN(d){ 
        document.getElementById(d).style.display = "none"; 
    }

    function DisplaySPAN(d){ 
        document.getElementById(d).style.display = "block"; 
    }
    
    function show_alert(message){
        alert(message);
    }

    function logIn(){  
        var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
        var layer = document.createElement('div');
        layer.style.zIndex = 2;
        layer.id = 'layer';
        layer.style.position = 'absolute';
        layer.style.top = '0px';
        layer.style.left = '0px';
        layer.style.height = document.documentElement.scrollHeight + 'px';
        layer.style.width = width + 'px';
        layer.style.backgroundColor = 'black';
        layer.style.opacity = '.6';
        layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
        document.body.appendChild(layer);  

        node = document.createElement("div");
		node.id = "authorization";
		node.style.position = "absolute";
		node.style.top = "50%";
		node.style.left = "50%";
		node.style.width = "200px";
		node.style.height = "180px";
		node.style.margin = "-35px 0px 0px -75px";
		node.style.background = "black";
		node.style.border = "1px dashed #ffffff";
		node.style.textAlign = "center";
		node.style.color = "#ffffff";
		node.style.font = "11px Tahoma, sans-serif";
        node.style.lineHeight = "13px";
		node.style.zIndex = 20;
		document.body.appendChild(node);
            
        var markup="<form name='loginForm' action='index.php?page=login' method='post' enctype='multipart/form-data'>";         
        markup=markup+"<p><br />Enter username here:<br />";            
        markup=markup+"<br /><input id='logbox' type='text' name='nameform' ></p>";
        markup=markup+"<p>Enter password here:<br />";
        markup=markup+"<br /><input id='logbox' type='password' name='passform' ></p>";  
        markup=markup+"<input type='checkbox' name='remform' /> Remember Me <input type='submit' name='submit' value='Login' /> ";
        markup=markup+"</form>";
            
        node.innerHTML=markup;
    }

    function editUser(username, error){
        
        var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
        var layer = document.createElement('div');
        layer.style.zIndex = 2;
        layer.id = 'layer';
        layer.style.position = 'absolute';
        layer.style.top = '0px';
        layer.style.left = '0px';
        layer.style.height = document.documentElement.scrollHeight + 'px';
        layer.style.width = width + 'px';
        layer.style.backgroundColor = 'black';
        layer.style.opacity = '.6';
        layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
        document.body.appendChild(layer); 
        
        node = document.createElement("div");
		node.id = "edituser";
		node.style.position = "absolute";
		node.style.top = "40%";
		node.style.left = "40%";
		node.style.width = "400px";
		node.style.height = "410px";
		node.style.margin = "-35px 0px 0px -75px";
		node.style.background = "black";
		node.style.border = "1px dashed #ffffff";
		node.style.textAlign = "center";
		node.style.color = "#ffffff";
		node.style.font = "11px Tahoma, sans-serif";
        node.style.lineHeight = "13px";
		node.style.zIndex = 20;
		document.body.appendChild(node)
        
        var markup="<p></p><h4>Edit User Account : "+username+"</h4>";
        markup=markup+"<p><font color=red>"+error+"</font></p>";
        markup=markup+"<form name='editForm' action='index.php?page=edituser' method='post' enctype='multipart/form-data'>";
        markup=markup+"<p>Enter current password:<br />";
        markup=markup+"<br /><input id='logbox' type='password' name='oldpass' ></p>";
        markup=markup+"<p>Enter new password:<br />";
        markup=markup+"<br /><input id='logbox' type='password' name='newpass' ></p>";
        markup=markup+"<p>Confirm new password:<br />";
        markup=markup+"<br /><input id='logbox' type='password' name='confpass' ></p>";
        markup=markup+"<p><br />Email Address:<br />";            
        markup=markup+"<br /><input id='logbox' type='text' name='email' ></p>";
        markup=markup+"<input type='submit' name='submit' value='Edit Account' /> ";
        markup=markup+"</form>";
        
        node.innerHTML=markup;
    }
    

