/**
 * SWFCache v1.1: Flash Player cache control
 *
 * SWFCache is (c) 2007 Chris Your and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof ign == "undefined") var ign = new Object();
ign.SWFCache = function(swf, mode, c) {
	this.swf = new String();
	this.cache = new String();
	if (mode == 'development'){
		// # Create TimeStamp Cache
		var d = new Date();
		var c = d.getTime();
		this.setCache(c);
		this.makeSwf(swf);
	} else if (mode == 'production' && c == 'global'){
		// # Production, Use Global Cache
		this.useGlobal();
		this.makeSwf(swf);
	} else if (mode == 'production' && c != null){
		// # Production, Defined Cache
		this.setCache(c);
		this.makeSwf(swf);
	} else {
		// # Production, No Cache
		this.setCache('');
		this.makeSwf(swf);
	}
}
ign.SWFCache.prototype = {
	setSwf: function(swf) {
		this.swf = swf;
	},
	makeSwf: function(swf){
		this.setSwf(swf + '?swfcache=' + this.cache);
	},
	setCache: function(cache) {
		this.cache = cache;	
	},
	useGlobal: function() {
		// # Global (site-wide) Cache Value
		// # Temp Mode for Global Caching
		// # Valid values: development, production
		var tmp_mode = "development";
		// # Prod/Dev
		if (tmp_mode == "development"){
			// # Development, Global
			// # Timestamp
			var d = new Date();
			var c = d.getTime();
			this.setCache(c);
		} else {
			// # Production, Global
			// # Modify to re-cache swf files site-wide
			this.setCache(0);
		}
	}
}
var SWFCache = ign.SWFCache;