// Create the namespace
if( !window.com ) {
	/**
	 * @ignore
	 **/
	window.com = new Object();
}
if( !com.bigbad ) {
	/**
	 * @ignore
	 **/
	 com.bigbad = new Object();
}

/**
 * @class Popup Features for simple creation of popup windows with given features.
 * <p><b>Usage:</b></p>
 * <dl>
 *   <dt>To create a popup that is not resizable and does not display the status bar, scroll bars, tool bar, or menu bar</dt>
 *   <dd><code>var myPopupFeatures = new com.bigbad.PopupFeatures( {scrollbars:false,status:false,resizable:false} );</code></dd>
 *   <dd><code>window.open( "myUrl", "myTarget", myPopupFeatures.toString() );</code></dd>
 *
 *   <dt style="margin-top: 12px;">To create a popup that uses all of the default features except for having a unique width and height</dt>
 *   <dd><code>window.open( "myUrl", "myTarget",</code><code style="display: block; padding-left: 20px;">com.bigbad.PopupFeatures.defaultPopupFeatures.toString( {width:500,height:400} ) );</code></dd>
 *
 * </dl>
 *
 * <p>Note: not all properties are available in all browsers</p>
 *
 * @author Gregory Ramsperger <Gregory.Ramsperger@BigBad.com>
 * @version 1.1, June 22, 2005
 *
 * @constructor
 * @param defaults <dfn>Object</dfn> Object whose properties will be used as default values for this instance. See <code>toString()</code>
 **/
com.bigbad.PopupFeatures = function( defaults ) {
	if( defaults == null ) return;

	// transfer all properties into this object.
	var prop;
	for( prop in defaults ) {
		this[prop] = defaults[prop];
	}
}

/**
 * Convert the PopupFeatures instance to a string
 * @param overrides <dfn>Object</dfn> Object whose properties will be used to override the instance properties
 * @return the string to be used as the features parameter in the <code>window.open( <i>url</i>, <i>target</i>, <i>features</i> )</code> call.
 * @type String
 **/
com.bigbad.PopupFeatures.prototype.toString = function( overrides ) {
	if( overrides == null ) overrides = new Object();

	var rtn = new Array();
	for( prop in this ) {
		var val;
		if( (val = this.getPropValue(prop, overrides))!=null ) {
			if( typeof val == "function" ) continue;
			switch( prop ) {
				case "left":
					rtn[rtn.length] = "screenX=" + val;
				case "top":
					rtn[rtn.length] = "screenY=" + val;
				default:
					rtn[rtn.length] = prop + "=" + val;
			}
		}
	}
	return rtn.join(",");
}

/**
 * Retrieve the set value a given property.
 * <p>Boolean values are converted to the strings "yes" or "no", representing <code>true</code> and <code>false</code> respectively
 * @private
 * @param prop <dfn>String</dfn> Name of the property to retrieve.
 * @param overrides <dfn>Object</dfn> Object whose properties will be used in place of instance values for popup properties. See <code>toString()</code>
 * @return the value or <code>null</code> if the value was not set.
 **/
com.bigbad.PopupFeatures.prototype.getPropValue = function( prop, overrides ) {
	var val = null;
	if( overrides == null ) val = this[prop];
	else val = ( overrides[prop] != null ) ? overrides[prop] : this[prop];
	return ( val == null ) ? null : (typeof val == "boolean" ? ( val ? "yes" : "no" ) : val );
}

/**
 * <p>Copy parent window's history to the new child window.</p>
 * <p>Default: no value</p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.copyhistory = null;

/**
 * <p>New window is dependent on parent window and is closed automatically if parent is closed.</p>
 * <p>Default: no value</p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.dependent = null;

/**
 * <p>New window has directory buttons</p>
 * <p>Default: <code>false</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.directories = false;

/**
 * <p>height of new window in pixels</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.height = null;

/**
 * <p>Height of content (visible body area) in new window in pixels</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.innerHeight = null;

/**
 * <p>Width of content (visible body area) in new window in pixels</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.innerWidth = null;

/**
 * <p>Initial position on screen of the left edge of the popup window</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.left = null;

/**
 * <p>New window has the location bar</p>
 * <p>Default: <code>false</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.location = false;

/**
 * <p>New window has the menu bar</p>
 * <p>Default: <code>false</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.menubar = false;

/**
 * <p>Height of the new window (including chrome) in pixels</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.outerHeight = null;

/**
 * <p>Width of the new window (including chrome) in pixels</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.outerWidth = null;

/**
 * <p>New window is resizable by the user</p>
 * <p>Default: <code>true</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.resizable = true;

/**
 * <p>New window has the scroll bars</p>
 * <p>Default: <code>true</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.scrollbars = true;

/**
 * <p>New window has the status bar</p>
 * <p>Default: <code>true</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.status = true;

/**
 * <p>New window has the tool bar</p>
 * <p>Default: <code>false</code></p>
 * @type Boolean
 **/
com.bigbad.PopupFeatures.prototype.toolbar = false;

/**
 * <p>Initial position on screen of the top edge of the popup window</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.top = null;

/**
 * <p>Width of new window in pixels</p>
 * <p>Default: no value</p>
 * @type Number
 **/
com.bigbad.PopupFeatures.prototype.width = null;

/**
 * PopupFeatures instance using all of the default values.
 * @type com.bigbad.PopupFeatures
 **/
com.bigbad.PopupFeatures.defaultPopupFeatures = new com.bigbad.PopupFeatures();


/**
 * @class Popup for simple creation of popup windows.
 * <p>Note: All methods are static</p>
 *
 * @author Gregory Ramsperger <Gregory.Ramsperger@BigBad.com>
 * @version 1.0, June 22, 2005
 *
 * @constructor
 **/
com.bigbad.Popup = function() {}

/**
 * Popup a window using the properties of an HTML anchor tag.
 * <p><strong>Accessibility note:</strong> This method should be used whenever popping up window from an anchor link. This allows browsers without JavaScript to reach the window. Additionally, search engines will also be able to crawl though this link.</p>
 * 
 * <p><b>Usage:</b></p>
 * <dl>
 *   <dt>Open popup using width and height set in PopupFeatures instance.</dt>
 *   <dd><code>&lt;a href="/some/url/" target="myWin" onclick="return com.bigbad.Popup.popupDom(this, myPopupFeatures);"&gt;popup&lt;/a&gt;</code></dd>
 *
 *   <dt style="margin-top: 1em;">Open popup using width and height overrides to the default PopupFeatures instance.</dt>
 *   <dd><code>&lt;a href="/some/url/" target="myWin" onclick="return com.bigbad.Popup.popupDom(this, null, {width:600,height:400} );"&gt;popup&lt;/a&gt;</code></dd>
 *
 *   <dt style="margin-top: 1em;">Open popup using width and height overrides to the default PopupFeatures instance.</dt>
 *   <dd><code>&lt;a href="/some/url/" target="myWin" onclick="return com.bigbad.Popup.popupDom(this, myPopupFeatures, {width:600,height:400} );"&gt;popup&lt;/a&gt;</code></dd>
 * </dl>
 *
 *
 * @param anchor <dfn>HTMLAElement</dfn> reference to an anchor tag.
 * @param features <dfn>com.bigbad.PopupFeatures</dfn>, <i>optional</i> features of the new window.
 * @param overrides <dfn>Object</dfn>, <i>optional</i> overrides to features parameter
 * @return <code>false</code> on success.
 * @see com.bigbad.PopupFeatures#toString
 **/
com.bigbad.Popup.popupDom = function( anchor, features, overrides ) {
	com.bigbad.Popup.popup( 
		anchor.href,
		anchor.target,
		features,
		overrides
	);
	return false;
}

/**
 * Popup a window
 *
 * <p><b>Usage:</b></p>
 * <dl>
 *   <dt>Open popup using width and height set in PopupFeatures instance.</dt>
 *   <dd><code>var myWin = com.bigbad.Popup.popup("/some/url/", "myWin", myPopupFeatures);</code></dd>
 *
 *   <dt style="margin-top: 1em;">Open popup using width and height overrides to the default PopupFeatures instance.</dt>
 *   <dd><code>var myWin = com.bigbad.Popup.popup("/some/url/", "myWin", null, {width:600,height:400} );</code></dd>
 *
 *   <dt style="margin-top: 1em;">Open popup using width and height overrides to the default PopupFeatures instance.</dt>
 *   <dd><code>var myWin = com.bigbad.Popup.popup("/some/url/", "myWin", myPopupFeatures, {width:600,height:400} );</code></dd>
 * </dl>
 *
 * @param url <dfn>String</dfn> initial URL of the popup window
 * @param target <dfn>String</dfn> the name of the newly created window
 * @param features <dfn>com.bigbad.PopupFeatures</dfn>, <i>optional</i> features of the new window.
 * @param overrides <dfn>Object</dfn>, <i>optional</i> overrides to features parameter
 * @return the newly created Window instance
 * @see com.bigbad.PopupFeatures#toString
 **/
com.bigbad.Popup.popup = function( url, target, features, overrides ) {
	if( target == null || target == "" || target == "_blank" || target == "_new" ) target = "popup";
	if( features == null ) features = com.bigbad.PopupFeatures.defaultPopupFeatures;

	var win = window.open(
		url,
		target,
		features.toString( overrides )
	);
	win.focus();
	return win;
}
/*  TLK added custom 9/6/06 */
	function OpenBRWindow() {
	    
	    var x=window.open("http://stagingjobs.brassring.com/1033/ASP/TG/cim_home.asp?partnerid=25038&amp;siteid=5338","search","height=500,width=950,menubar=no,scrollbars=yes,toolbar=no,status=no,left=10,top=10,resizable=yes");
	}