
function confirmDelete() {
	if(!confirm('Are your sure you want to delete this record?')) {
		return false;
	} else {
		return true;
	}
}


// *********************************
//latest x-core stuff from cross-browser.com

var xVersion='3.15.1',xNN4=false,xOp7=false,xOp5or6=false,xIE4Up=false,xIE4=false,xIE5=false,xUA=navigator.userAgent.toLowerCase();
if(window.opera){
  xOp7=(xUA.indexOf('opera 7')!=-1 || xUA.indexOf('opera/7')!=-1);
  if (!xOp7) xOp5or6=(xUA.indexOf('opera 5')!=-1 || xUA.indexOf('opera/5')!=-1 || xUA.indexOf('opera 6')!=-1 || xUA.indexOf('opera/6')!=-1);
}
else if (document.all) {
  xIE4Up=xUA.indexOf('msie')!=-1 && parseInt(navigator.appVersion)>=4;
  xIE4=xUA.indexOf('msie 4')!=-1;
  xIE5=xUA.indexOf('msie 5')!=-1;
}
// Object:
function xGetElementById(e) {
  if(typeof(e)!='string') return e;
  if(document.getElementById) e=document.getElementById(e);
  else if(document.all) e=document.all[e];
  else e=null;
  return e;
}


function elementShow(id){
	var e = xGetElementById(id);
	e.style.display = "block";
}

function elementHide(id){
	var e = xGetElementById(id);
	e.style.display = "none";
}

// *********************************




function divShowHide(div) {
	var divEl = document.all[div];
	
	divEl.style.display = (divEl.style.display == "none") ? "block" : "none";
}



// variable holding whether or not browser supports functionality needed
var isDom  = (document.getElementById && document.createTextNode);

// receives the id of an element, creates an object, and then changes that object's css properties to none or block (hide or show)
function switchStatus(id){
	if (isDom){														// test browser capability
		f=document.getElementById(id);						// create an object which inherently gets all the tag (element) attributes (like style)
		d=f.style.display;											// find out what current status is
		f.style.display=(d=="block")?"none":"block";	// set style to opposite of what it is
	}
} 


function highlightError(id) {
	if(id != "") {
		if (isDom){														// test browser capability		
			f=document.getElementById(id);					// create an object which inherently gets all the tag (element) attributes (like style)
			d=f.style.color;												// find out what current status is
			b=f.style.background;										// find out what current status is
			f.style.color=(d=="green")?"green":"red";		// set style to opposite of what it is
			f.style.background=(b=="")?"yellow":"";			// set style to opposite of what it is
		}	
	}
}

