var CORE = {};

CORE.util = {};


CORE.util.IEFlash = function(){
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++)
	{
		objects[i].outerHTML = objects[i].outerHTML;
	}
};




// UTILITY functions
CORE.util.openPop = function(filename, name, width, height) {
	x = (640 - width)/2, y = (480 - height)/2;
   	if (screen) {
		y = (screen.availHeight - height)/2;
       	x = (screen.availWidth - width)/2;
   	}
	var page = filename;
	var windowprops = "height=" + height + ",width=" + width + ",location=no,status=no,scrollbars=yes,menubar=no,toolbar=no,resizable=yes,left="+x+",top="+y;
	var popup = window.open(page, name, windowprops);
};


$.fn.pause = function(milli,type) {
	milli = milli || 1000;
	type = type || "fx";
	return this.queue(type,function(){
		var self = this;
		setTimeout(function(){
			$.dequeue(self);
		},milli);
	});
};

$.fn.clearQueue = $.fn.unpause = function(type) {
	return this.each(function(){
		type = type || "fx";
		if(this.queue && this.queue[type]) {
			this.queue[type].length = 0;
		}
	});
};
