/**
* Creates a window with an image inside from the parameters passed.
*
* @params string image url
* @params int image width
* @params int image height
* @return void
*/
function showImage( image_url, image_width, image_height ) {

	var oConfig = { 'url': 'about:blank', 'width': image_width, 'height': image_height, 'scroll' : false , 'statusbar' : false};
	
	var oImageWindow = createWindow( oConfig );
	
	try {
	
		oImageWindow.document.write( '<body style="margin: 0px; padding: 0px;"><img src="' + image_url + '" /></body>' );
		oImageWindow.document.close();
	
	} catch( e ) {
		
		oImageWindow.close();
		
	}
}

function addNullOption(obj, text) {
	var oOption = document.createElement("OPTION");
	obj.options.add(oOption);
	oOption.text = "-" + text + "-";
	oOption.value = 0;
}

function createOption(oParent, text, value, selected) {
	
	if (oParent == null) {
		return false;
	}
	
	var oOption = document.createElement("OPTION");
	oOption.text = text;
	oOption.value = value;
	oOption.selected = selected; 
	
	oParent.options.add(oOption);
	
	return true;
}


function emptySelect(oParent) {
	
	if (oParent == null) {
		return false;
	}
	
	oParent.options.length = 0;	
	return true;
}
