//////////////////////////////////////////////////////////////
//                                                          //
//   Original code written by Reboot Concetps, Inc. for:    //
//   Dealoco, LLC.                                          //
//                                                          //
//   Contact us for support, upgrades, or assistance.       //
//   support@rebootconcepts.com                             //
//                                                          //
//   Any modifications to the code below not written by     //
//   Reboot Concepts, Inc. will invalidate any and all      //
//   warranty previously agreed upon.  While Reboot         //
//   Concepts, Inc. is not responsible for repairing such   //
//   a modification, we would be happy to do so at our      //
//   hourly rate.                                           //
//                                                          //
//////////////////////////////////////////////////////////////

function expcoll( n ) {
	if( document.getElementById( 'deal' + n ).style.display == 'none' ) { // Deal is collapsed; Expand.
		changeImages( 'expcoll' + n, '/images/button_minus.gif' );
		document.getElementById( 'deal' + n ).style.display = 'block';
	} else {
		changeImages( 'expcoll' + n, '/images/button_plus.gif' );
		document.getElementById( 'deal' + n ).style.display = 'none';
	}
	return false;
}

function expcollgrp( ns, id, state ) {
	var head = document.getElementById( 'head' + id );
	if( ( state != true ) && ( head.state == null ) ) {
		head.state = false;
	}
		
	var divs = ns.split(",");
	if( head.state == false ) {
		for( var i = 0; i < divs.length; i++ ) {
			e = document.getElementById( 'deal' + divs[i] );
			changeImages( 'expcoll' + divs[i], '/images/button_plus.gif' );
			e.style.display = 'none';
		}
		head.state = true;
		head.src = '/images/body_orange_corner_plus.gif';
	} else {
		for( var i = 0; i < divs.length; i++ ) {
			e = document.getElementById( 'deal' + divs[i] );
			changeImages( 'expcoll' + divs[i], '/images/button_minus.gif' );
			e.style.display = 'block';
		}
		head.state = false;
		head.src = '/images/body_orange_corner_minus.gif';
	}
}

function setSelectOptions( the_select, do_check ) {
    var selectObject = document.getElementById( the_select );
    var selectCount  = selectObject.length;

    for (var i = 0; i < selectCount; i++) {
        selectObject.options[i].selected = do_check;
    }

    return true;
}

var preloadFlag = false;
