/* $Id: functions.js,v 1.21 2002/04/21 11:48:34 loic1 Exp $ */


/**
 * Displays an confirmation box beforme to submit a "DROP/DELETE/ALTER" query.
 * This function is called while clicking links
 *
 * @param   object   the link
 * @param   object   the sql query to submit
 *
 * @return  boolean  whether to run the query or not
 */
var confirmMsg  = 'Do you really want to ';

function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    if (confirmMsg == '') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function



function donothing() {} 
function gotosite(site)
	{            
        if (site != "") {self.location=site;}
 	}
 	
 	
 	
function checkedAll (id, checked) {
	var el = document.getElementById(id);
	for (var i = 0; i < el.elements.length; i++) {
	  el.elements[i].checked = checked;
	}
}




function expose(target) {
    if(document.getElementById(target).style.display == 'block'){
    	document.getElementById(target).style.display = 'none';
    } else {
    	document.getElementById(target).style.display = 'block';
    }
}



function teaser_rollover( target , filename) {
    document.getElementById(target).style.backgroundImage = "url(\"" + filename + "\")";
}

function teaser_rollout( target , filename) {
    document.getElementById(target).style.backgroundImage = "url('" + filename + "')";
}