if(rarebrick == undefined) var rarebrick = new Object();


rarebrick.writeNoFlashMessage = function() {
	document.write('<strong>Welcome to The Swag</strong><br>');
    document.write('This site uses Flash. You do not have the flash player installed. Please <a href="http://www.adobe.com/products/flashplayer/" target="_blank">install the Adobe flash player</a> to continue.');
}

rarebrick.writeFlashHeader = function(xmlFile) {
	//define new swf (name, id, width, height, flash version, bgcolor)
	var so = new SWFObject('header_0804.swf', 'introflash', '908', '492', '8', '#ffffff');
	so.addVariable('xmlFile', xmlFile); //add xml file for slideshow
	so.addParam('wmode', 'transparent'); //set background to transparent
	so.useExpressInstall('swf/expressinstall.swf'); //expressInstall for auto-installation of flash player on browser
	so.write('flashheader'); //write flash
}

rarebrick.makeSubhead = function(elem, width, numLines) {
	//var theElem = document.getElementById(elem);
	//theElem.style.height = '' + height + 'px';
	//theElem.style.width = '' + width + 'px';

	if(numLines == undefined) numLines = 1;
	var height = 20 + (20 *(numLines-1));
	
	//alert(unescape(rarebrick.html2xml.getXml(elem)));
	var so = new SWFObject('swf/subhead.swf', elem, width, height, '9', '#eeeeee');
	so.addVariable('xmlHtml', rarebrick.html2xml.getXml(elem)); 
	so.addVariable('fontSize', 20);
	so.addParam('wmode', 'transparent'); //set background to transparent
	so.write(elem); //write flash
}

rarebrick.makePromoFlash = function(img, href, target, width, height) {
	if(target == undefined) target = '_self';
	if(width == undefined) width = 185;
	if(height == undefined) height = 258;
	var so = new SWFObject('swf/promoFlash_0807.swf', 'promoFlash', width, height, '9', '#ffffff');
	so.addParam('wmode', 'transparent'); //set background to transparent
	so.addVariable('img', img);
	so.addVariable('href', href);
	so.addVariable('target', target);
	so.write('promoFlash'); //write flash
}

rarebrick.popup = function(theURL,winName,features) {
  window.open(theURL,winName,features);
}







