
function confirmDeletion(question) {
	if (confirm(question)) return true;
	else return false;
}

function SELECT_addOption(selectId,optionValue,optionText) {
	var objtselect = document.getElementById(selectId);
	var dmc = document.createElement("option"); 
	dmc.text = optionText ; 
	dmc.value = optionValue; 
	if(!document.all){ 
	  before= objtselect.options[1]; 
	}else{ 
	  before=1; 
	} 
	objtselect.add(dmc,before);
}

function gc(controlID) {
	return document.getElementById(controlID);
}

function show(controlID) {
	gc(controlID).style.display='block';
}

function hide(controlID) {
	gc(controlID).style.display='none';
}

function SELECT_removeOptions(selectId) {
	var objtselect = document.getElementById(selectId);
	objtselect.options.length = 0;
}

function SELECT_removeSelectedOption(selectId) {
	var objtselect = document.getElementById(selectId);
	if (objtselect.options.length>0&&objtselect.selectedIndex>=0) objtselect.remove(objtselect.selectedIndex);
}


//Changes the cursor to an hourglass
function cursor_wait() {
	document.body.style.cursor = 'progress';
}

// Returns the cursor to the default pointer
function cursor_clear() {
	document.body.style.cursor = 'default';
}

function scroll(id) {
	scrollDiv=document.getElementById(id);
	//alert(scrollDiv.offsetHeight);
	if (scrollDiv.offsetHeight<=44) scrollDiv.style.height='auto';
	else scrollDiv.style.height='43px';
}

function popup(name,page)
{
	window.open (name, page, config='height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
}

