var images=new Array();
var text  =new Array();

//BEGIN configuration section
images[0]="md_beaded_cornices.jpg"; text[0] = "";
images[1]="md_two_story_great_room.jpg"; text[1] = "";
images[2]="md_box_pleated_valances.jpg"; text[2] = "";
images[3]="md_roman_shades.jpg"; text[3] = "";
images[4]="md_london_valances.jpg"; text[4] = "";
images[5]="md_formal_dining_room.jpg"; text[5] = "";
images[6]="md_traditional_swags.jpg"; text[6] = "";
images[7]="md_luxurious_drapery_panels.jpg"; text[7] = "";
images[8]="md_double_ring_detail.jpg"; text[8] = "";
images[9]="md_luxurious_guest_room.jpg"; text[9] = "";
images[10]="md_relaxed_swag.jpg"; text[10] = "";
images[11]="md_great_room.jpg"; text[11] = "";
images[12]="md_buttoned_headrail.jpg"; text[12] = "";
images[13]="md_casual_swags.jpg"; text[13] = "";
images[14]="md_rosette_mounted_drapery.jpg"; text[14] = "";
images[15]="md_goblet_pleated_drapery.jpg"; text[15] = "";
images[16]="md_colorful_swag_treatment.jpg"; text[16] = "";
images[17]="md_carlyle_condos.jpg"; text[17] = "";

var preloadimages=true;
var optlinktarget="";
var imgborderwidth=0;
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)";

//END configuration secion
if (preloadimages) {
	for (x=0; x<images.length; x++) {
		var myimage = new Image();
		myimage.src = 'gallery/'+images[x];
	}
}

function returnimgcode(theimg) {
	var imghtml = "";
	imghtml='<img src="gallery/'+theimg+'" border="'+imgborderwidth+'" vspace="0">'
	return (imghtml);
}

function modifyimage(loadarea, imgindex) {
	if (document.getElementById) {
		var imgobj = document.getElementById(loadarea);
		
		if (imgobj.filters && window.createPopup) {
			imgobj.style.filter=filterstring;
			imgobj.filters[0].Apply();
		}
		imgobj.innerHTML = returnimgcode(images[imgindex]);

		var newdesc     = text[imgindex];
    var loadtext = document.getElementById("loadtext");

		
		if (imgobj.filters && window.createPopup)
			imgobj.filters[0].Play();

   	//loadtext.firstChild.nodeValue = newdesc;
			
		return false;
	}
}

