basedir = "/admin/"

ns = (navigator.appName=="Netscape")? 1:0 
ie = (navigator.appName=="Microsoft Internet Explorer")? 1:0
mac = (navigator.appVersion.indexOf("Mac") != -1)
win = (navigator.appVersion.indexOf("Win") != -1)
ns5 = (document.getElementById&&!document.all)? 1:0   ///// Netscape 5 en Netscape 6 en Mozilla 


function chooseStyle() {
 // alert(navigator.appVersion);
	styles = ""
	if (mac){styles = basedir+"styles/macstyle.css";}
	else 	{styles = basedir+"styles/style.css";} 
	
	stylelink = "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + styles + "\">"	
	// alert(navigator.appName)
	// alert(stylelink)
	document.write(stylelink)
	return true
}
chooseStyle() 


//Highlight form element- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

var highlightcolor="#ebebeb"

var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}



function stat(txt) {
    window.status = txt;
    }


	function doConfirm(what,which) {
	    if (confirm(what))
		{document.location.href=which}
	}
	
	function doDeny(which) {
	    if (confirm('Are you sure you want to deny this user? \n(Warning: record will be permanently deleted!)'))
		{document.location.href=which}
	}

	function doClose(which) {
	    if (confirm('Are you sure you want to close this item? \n(Warning: the entry will dissapear!)'))
		{document.location.href=which}
	}

	function doDelete(which) {
	    if (confirm('Are you sure you want to delete this item? \n(Warning: this action will delete permanently!)'))
		{document.location.href=which}
	}

	function doDeleteWhat(which,what) {
	    if (confirm('Are you sure you want to delete ' + what + '? \n(Warning: this action will delete permanently!)'))
		{document.location.href=which}
	}


	function doChangeStatus(which,what) {
	    if (confirm('Are you sure you want to ' + what + ' this item? '))
		{document.location.href=which}
	}


	function doDirDelete(which) {
		if (confirm('Are you sure you want to delete this item? \n(Warning: this action will delete all files and subfolders within this directory too!)'))
		{document.location.href=which}
	}


