
/**
 * Custom initialization function to be called be the delicious overlay application when the
 * YUI.onDomReady event fires
 *
 * Find all javascript warnings and hide them
 * Find all the "customize" buttons and enable them by making them visible
 */
function customInitMethod() {
	hideJavascripWarning();
	showCustomizeButtons();
}

/**
 * Find all customize buttons and show them to the user
 */
function showCustomizeButtons(){
	$buttons = Dom.getElementsByClassName('customizeButton');
	//- Y-AHOO.log("$buttons.length = '" + $buttons.length + "'", "info", "YAHOO.delicious.slidingInterface.pane");
	var max = $buttons.length;
	//log('found ' + max + ' customize buttons');
	
	//- Y-AHOO.log("	will init '" + max + "' buttons", "info", "YAHOO.delicious.slidingInterface.pane");
	for (var i = 0; i < max; i++) {
		//log('working on customize button ' + i);
		Dom.setStyle($buttons[i], 'display', 'inline');
	}
}

/**
 * Find all javascript disabled warnings and hide them from the user
 */
function hideJavascripWarning() {
	$divs = Dom.getElementsByClassName( 'javascript-warning' );
	//- Y-AHOO.log("$buttons.length = '" + $buttons.length + "'", "info", "YAHOO.delicious.slidingInterface.pane");
	var max = $divs.length;
	//log('found ' + max + ' javascript warnings');
	
	//- Y-AHOO.log("	will init '" + max + "' buttons", "info", "YAHOO.delicious.slidingInterface.pane");
	for (var i=0; i < max; i++) {
		//log('working on javascript warning ' + i);
		Dom.setStyle($divs[i], 'display', 'none');
	}
}
