// Begin ESRB pop-up
function popUp(URL,x,y,r) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=" + r + ",scrollbars=1,location=0,statusbar=0,menubar=0,resizable=" + r + ",width=" + x + ",height=" + y + "');");
}
// End 
	
// Begin Privacy pop-up
function privacyWin(url, urchinCode) {
	// basic popup
	popupWin = window.open(url, 'pp', "width=800,menubar=1,toolbar=1,scrollbars=1");
	
	// urchin code
	urchinTracker(urchinCode);
	
}
// End 

function popUpIcons(url) {
	iconWin = window.open(url,'Icons',"width=632,height=263,menubar=0,toolbar=0,scrollbars=0");
	iconWin.focus();
}


/**
 * CHECK WIDTH
 * This Object makes up for Internet Explorer's lack of support for css min-width.
 * If div#flash_content has a width < 950 (on load or resize) then the wrapper is given an explicit css width of 950px.
 * Otherwise, the css width value is NULLed out, and the div gets it default width of 100%.
 */
var checkwidth = {
	flash : Object,
	active : false,
	minwidth : Number,
	minwidthpx : String,
	init : function() {
		if (document.all) { // only functions in IE
			this.flash = document.getElementById("flash_content");
			this.active = true;
			this.minwidth = 950;
			this.minwidthpx = this.minwidth + "px";

			this.check();
		}
	},
	check : function() {
		if (this.active) {
			// check computed width of element
			if (this.flash.offsetWidth < this.minwidth) {
				this.flash.style.width = this.minwidthpx;
			} else {
				this.flash.style.width = "";
			}
		}
	},
	/**
	 * UNLOAD
	 * Removes reference to div#flash_content, fixing IE memory leak
	 */
	unload : function() {
		if (this.active) {
			this.flash = null;
		}
	}
}

window.onload = function() {
	checkwidth.init();
}
window.onresize = function() {
	checkwidth.check();
}
window.onunload = function() {
	checkwidth.unload();
}