_uacct = "UA-30928-28";
urchinTracker();


var MM_contentVersion = 6;
var isFlashInstalled = true;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i];
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('<'+'/SCR'+'IPT\> \n');
}
if ( !MM_FlashCanPlay ) {
	isFlashInstalled = false;
}






var exampleIndex = 1;

function writePortfolio() {
	if (!isFlashInstalled) {
		document.location.href = document.location.href + "/no-flash";
	}
	document.write("<div class=\"clear\"></div>");
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"780\" height=\"510\" title=\"Portfolio\" id=\"portfolio\">");
	document.write("<param name=\"movie\" value=\"../flash/portfolio.swf\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<embed src=\"../flash/portfolio.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"780\" height=\"510\" name=\"portfolio\"></embed>");
	document.write("</object>");
}

function swapExample(index) {
	document.getElementById('example').src = document.getElementById('example').src.replace(/main.*jpg/g, 'main' + index + '.jpg')
	exampleIndex = index;
}

function nextExample() {
	swapExample((exampleIndex%16) + 1);
	return false;
}

function previousExample() {
	if (exampleIndex == 1) {
		swapExample(16);
	} else {
		swapExample(exampleIndex-1);
	}
	return false;
}

function setText(){ 
var d=new Date();
var day=d.getDate();
var month=d.getMonth() + 1;



/*Now - SEPT 26*/
if (month == 9 && day <= 26) {
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Galaxy Collection of fabrics + extra 5% if installed by Christmas.  Sale ends 9/26/09.</p>");
}
/*Sept 27 to end of Sept*/
else if (month == 9 && day >= 27) {
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Designer's Choice Collection of fabrics + extra 5% if installed by Christmas.  Sale ends 10/13/09.</p>");
}
/*October 1 - 13*/
else if (month == 10 && day <= 13) {
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Designer's Choice Collection of fabrics + extra 5% if installed by Christmas.  Sale ends 10/13/09.</p>");
}
/*October 14 - October 27*/
else if (month == 10 &&  day >13 && day <=27 ){
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 55% on Draperies and Top Treatments from our entire stock of fabrics.  Sale ends 10/27/09.</p>");
}
/*October 27 -  End of October*/
else if (month == 10 && day >= 28 ){
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Galaxy Collection of fabrics.  Sale ends 12/5/09.</p>");
}
/*November*/
else if (month == 11 ){
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Galaxy Collection of fabrics.  Sale ends 12/5/09.</p>");
}
/*December 1 - December 5*/
else if (month == 12 && day <= 5 ){
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Galaxy Collection of fabrics.  Sale ends 12/5/09.</p>");
}

/*December 6 - January 2*/
else if ((month == 12 && day >= 6) || (month == 1 && day <= 2)){
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Designer's Choice Collection of fabrics + extra 10% off if you schedule an appointment by 1/2/10.  Sale ends 1/2/10.</p>");
}
/*January 1 - January 30*/
else if (month == 1 && day >= 3 ){
document.write("<h2><a href=\"../contact/\">Bonus Savings</a></h2><p>Save 50% on Draperies and Top Treatments from our Galaxy Collection of fabrics.  Sale ends 1/30/10.</p>");
}
}
