/*===============================================================================
 * Ai_SimpleButton Class Definintion
 *-------------------------------------------------------------------------------
 * Ai_SimpleButton Constructor
 * copyright 1999 - Applied Imagineering Inc. / Justin Stacey
 *-------------------------------------------------------------------------------
 */
 
function Ai_SimpleButton(imgID,srcBase,srcSuffix){
	if (window.document.images != null){
        this.imgID = imgID;
                
        this.off = new Image();
        this.on = new Image();
        this.off.src = srcBase + "_off" + srcSuffix;
        this.on.src = srcBase + "_on" + srcSuffix;
    }
}

/*-------------------------------------------------------------------------------
 * end Ai_SimpleButton Class Definintion
 *===============================================================================
 */

function butover(which){
	if (window.document.images != null){
	if (window.document.images != null){
        window.document[which.imgID].src = which.on.src;
    }
    }
}

function butout(which){
	if (window.document.images != null){
	if (window.document.images != null){
        window.document[which.imgID].src = which.off.src;
    }
    }
}


function windowManager(){
	this.creditwindow;
	this.sampleswindow;
	this.creditsURL = 'credits_popup/index.html';
	this.samplesURL = 'samples_popup/index_qt.html';
	this.creditwindowfeatures = '';
	
	this.creditwindowfeatures += 'toolbar=no,';
	this.creditwindowfeatures += 'location=no,';
	this.creditwindowfeatures += 'directories=no,';
	this.creditwindowfeatures += 'status=no,';
	this.creditwindowfeatures += 'menubar=no,';
	this.creditwindowfeatures += 'scrollbars=yes,';
	this.creditwindowfeatures += 'resizable=no,';
	this.creditwindowfeatures += 'width=320,';
	this.creditwindowfeatures += 'height=480';
	
	this.sampleswindowfeatures = '';
	
	this.sampleswindowfeatures += 'toolbar=no,';
	this.sampleswindowfeatures += 'location=no,';
	this.sampleswindowfeatures += 'directories=no,';
	this.sampleswindowfeatures += 'status=no,';
	this.sampleswindowfeatures += 'menubar=no,';
	this.sampleswindowfeatures += 'scrollbars=yes,';
	this.sampleswindowfeatures += 'resizable=no,';
	this.sampleswindowfeatures += 'width=320,';
	this.sampleswindowfeatures += 'height=280';
}

windowManager.prototype.openCreditWindow = function(){
	if (this.creditwindow != null){
		this.creditwindow = window.open(this.creditsURL,"creditwindow",this.creditwindowfeatures);
		this.creditwindow.focus();
	}
	else{
		this.creditwindow = window.open(this.creditsURL,"creditwindow",this.creditwindowfeatures);
		this.creditwindow.focus();
	}
}

windowManager.prototype.openSamplesWindow = function(){
	if (this.sampleswindow != null){
		this.sampleswindow = window.open(this.samplesURL,"sampleswindow",this.sampleswindowfeatures);
		this.sampleswindow.focus();
	}
	else{
		this.sampleswindow = window.open(this.samplesURL,"sampleswindow",this.sampleswindowfeatures);
	}
}
