
function setScene7Property(scene7groupname, value) {
if (scene7groupname != "") {
scene7group_previous[MODEL_ID][scene7groupname] = scene7group[MODEL_ID][scene7groupname];
scene7group[MODEL_ID][scene7groupname] = value;
if (scene7groupname == 'selectedWall' || scene7groupname == 'selectedTrim') {
for (var mid in scene7group) {
scene7group[mid][scene7groupname] = (value != "" ? value : "none");
}
$.ajax({
url: '/request.php?method=setsessionvar',
data: {configid:'config123456789', name:'scene7_'+scene7groupname, value:value},
type: 'POST',
dataType: 'xml',
timeout: 30000,
error: function(robj, etype, eobj) {
},
success: function(xml) {
}
});
}
}
}
function buildScene7Blind_Configurator() {
var url = '', show_spinner = true;
if (SCENE_7_OVERRIDE_SIDEBAR[MODEL_ID] != "") {
url = SCENE_7_OVERRIDE_SIDEBAR[MODEL_ID];
show_spinner = false; 
} 
else if (SCENE_7_FILENAME[MODEL_ID] != "") {
url = buildBlindURL(SCENE_7_FILENAME[MODEL_ID],SCENE_7_MODEL[MODEL_ID],268,366,scene7group[MODEL_ID]);
}
if (url != '') {
if (show_spinner) toggleScene7Cover('show');
if (USE_IMAGE_LOADER){
imagePreloaderQueue[imagePreloaderQueue.length] = new typedef_ImagePreloaderQueueItem([new typedef_preloadImage(url, "scene7image")]);
sendNextImagePreloaderRequest();
} else {
var o = getObj("scene7image");
if (o) o.src = url;
if (show_spinner) setTimeout("toggleScene7Cover('hide')", 1000);
}
}
}
var USE_FLASH_SPINNER = true; 
function s7SwatchZoom(oekey) {
var windowName="Levolor"; var windowFeatures="height=400,width=400,status=yes,toolbar=no,menubar=no,location=no";
var new_window = window.open("http:\/\/s7d2.scene7.com\/s7ondemand\/zoom\/flasht_zoom.jsp?company=Levolor&sku="+oekey,windowName,windowFeatures);
new_window.focus();
}
function toggleScene7Cover(msg) {
try {
window.document.scene7_spinner.SetVariable("testValue", msg);
} catch(err) {
}
}
function buildBlindURL(s7file,s7model,width,height,scene7data) {
for (key in scene7data) {
this[key] = scene7data[key];
}
var url="",draperyUrl="",hardwareUrl="";
switch (s7file) {
case "drapery_data.js":
if (s7model == 'valance') {
url = valance(width, height, selectedColor, draperyStyle, selectedWall, selectedTrim);
} else if (s7model == 'drapery') {
draperyUrl = drapery(width, height, selectedColor, draperyStyle, draw, grommetColor, corniceTopTreatment, selectedWall, selectedTrim, selectedPanel, selectedPanelColor); 
hardwareUrl = hardware(width, height, draperyHardwareType, draperyHardwareColor, draperyHardwareFinial, draperyHardwareColor, draperyHardwareRings, draw, selectedWall, selectedTrim);
url = drapery_final(draperyUrl, hardwareUrl, selectedWall, selectedTrim, width, height)
}
break;
case "aluminumblinds_data.js":url = crop(width,height,aluminumBlind(width, height, selectedProduct, selectedColor, selectedTape, selectedControlLiftPosition, selectedWall, selectedTrim));break;
case "cellular_data.js":url = crop(width,height,cellular(width, height, selectedColor, selectedColor2, selectedRenderingType, selectedControlOption, selectedControlLiftPosition, selectedWall, selectedTrim, selectedProduct)); break;
case "naturalshades_data.js":url = crop(width,height,naturalShade(width, height, selectedColor, selectedLiner, selectedControlOption, selectedFinishedEdge, selectedControlLiftPosition, selectedValance, selectedValanceTrim, selectedValanceStyle, selectedValanceColor, selectedScallop, selectedScallopTrim, selectedWall, selectedTrim, selectedFinishedEdgeSize)); break;
case "consolidatedwoods_data.js":  url = crop(width,height,consolidated(width, height, selectedProduct, selectedColor, selectedRendering, selectedControlLiftPosition, selectedControlType, selectedControlOption, selectedValance, selectedLightmaster, selectedProfile, selectedTape, selectedTapeSize, selectedWall, selectedTrim)); break;
case "paneltrack_data.js":url = panelTrack(width, height, selectedColor, selectedControlLiftPosition, selectedPanelPosition, selectedValanceStyle, selectedWall, selectedTrim); break;
case "pleatedshade_data.js":url = crop (width,height,pleatedShade(width, height, selectedColor, selectedColor2, selectedRenderingType, selectedControlOption, selectedLiftPosition, selectedWall, selectedTrim)); break;
case "rollershade_data.js":url = crop(width,height,rollerShade(width, height, selectedColor, selectedValance, selectedControlLiftPosition, selectedHemProfileEnabled, selectedHemProfile, selectedHemFinish, selectedHemColor, selectedWall, selectedTrim)); break; 
case "romans2007_data.js":url = crop2(width,height,romans2007Shade(width, height, selectedShadingEffect, selectedStyle, selectedColor, selectedControlLiftPosition, selectedControlOption, selectedHemProfileEnabled, selectedHemProfile, selectedHemFinish, selectedHemColor, selectedWall, selectedTrim, selectedValance, selectedHeadrail, selectedBottomrail, selectedHeadrailEnabled)); break;
case "verticals_data.js":url = verticals(width, height, selectedColor, selectedValanceStyle, selectedControlType, selectedControlLiftPosition, selectedWoodValance, selectedTrimValance, selectedWall, selectedTrim); break;
case "vperceptionsdoors_data.js":url = vPerceptions(width, height, selectedColor, selectedControlType, selectedValanceStyle, selectedValanceColor, selectedWall, selectedTrim); break;
case "nuwood_data.js":url = crop(width,height,nuWoodBlind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedTape, selectedWall, selectedTrim, tapeSize)); break;
case "classicwood_data.js":url = classicWoodBlind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedWall, selectedTrim); break;
case "fauxwood2_data.js":url = crop(width,height,fauxWood2Blind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedTape, selectedWall, selectedTrim, tapeSize)); break;
case "fauxwood25_data.js":url = crop(width,height,fauxWood25Blind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedWall, selectedTrim)); break;
case "premiumhardwood1_data.js":url = crop(width,height,premiumHardwood1Blind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedTape, selectedWall, selectedTrim, tapeSize)); break;
case "premiumhardwood2_data.js":url = crop(width,height,premiumHardwood2Blind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedTape, selectedControlOption, selectedLightmaster, selectedWall, selectedTrim, tapeSize)); break;
case "premiumhardwood25_data.js":url = crop(width,height,premiumHardwood25Blind(width, height, selectedRendering, selectedColor, selectedControlType, selectedControlLiftPosition, selectedCordlessHeadrail, selectedWall, selectedTrim)); break;
}
return url;
}
function typedef_scene7group() {
this.selectedAutoWand= "none";
this.selectedBottomrail= "";
this.selectedColor= "none";
this.selectedColor2= "none";
this.selectedControlType= "none";
this.selectedControlLiftPosition= "none";
this.selectedControlOption = "none";
this.selectedControlPosition= "none";
this.selectedCord= "none";
this.selectedCordlessHeadrail= "none";
this.selectedFinishedEdge= "none";
this.selectedFinishedEdgeSize= "none"; 
this.selectedGroover= "no";
this.selectedHeadrail= "81636";
this.selectedHeadrailEnabled= "";       
this.selectedHem= "none";
this.selectedHemColor= "none";
this.selectedHemFinish= "none";
this.selectedHemProfile= "none";
this.selectedHemProfileEnabled= "none";
this.selectedLightmaster= "none";
this.selectedLiftCord= "none";
this.selectedLiftPosition= "none";
this.selectedLiner= "none";
this.selectedPanelPosition= "none"; 
this.selectedProduct= ""; 
this.selectedProfile= "none";
this.selectedRendering= "closed"; 
this.selectedRenderingType= "Day";
this.selectedScallop= "none";
this.selectedScallopTrim= "none";
this.selectedShadingEffect= "none"; 
this.selectedStyle= "none"; 
this.selectedTape= "none";
this.selectedTapeSize= "none";
this.selectedTrim= "WHITE"; 
this.selectedTrimValance= "none"; 
this.selectedTDBU= "none";
this.selectedType= "none";
this.selectedValance= "none"; 
this.selectedValanceColor= "none";
this.selectedValanceStyle= ""; 
this.selectedValanceTrim= "none";
this.selectedWall= "F6F5EB";
this.selectedWand= "none";
this.selectedWoodValance= "none"; 
this.draw= "Split";
this.draperyStyle= "";
this.grommetColor= "";
this.corniceTopTreatment= "None";
this.selectedPanel= "No";
this.selectedPanelColor= "";
this.draperyHardwareType= "";
this.draperyHardwareColor= "";
this.draperyHardwareFinial= "";
this.draperyHardwareFinialColor= "";
this.draperyHardwareRings= "";
this.tapeSize= "";
}
function typedef_category(categoryid, categoryname, scene7code, swatchcount, directoryname, modelid) {
this.categoryid = categoryid;
this.categoryname = categoryname;
this.scene7code= scene7code;
this.swatchcount = swatchcount;
this.directoryname= directoryname; 
this.modelid = modelid;
}
function typedef_collection(collectionid, categoryid, collectionname, feature1, feature2) {
this.collectionid = collectionid;
this.categoryid = categoryid;
this.collectionname = collectionname;
this.feature1 = feature1;
this.feature2 = feature2;
}
function typedef_swatch(attributeid, swatchid, categoryid, collectionid, text, src, full, checkedbydefault, scene7groupname, oekey, stockoutdate, canorder, incart, inlist) {
this.attributeid = attributeid;
this.swatchid = swatchid;
this.categoryid = categoryid;
this.collectionid = collectionid;
this.text = text;
this.src = src;
this.full = full;
this.checkedbydefault = checkedbydefault;
this.scene7groupname = scene7groupname;
this.oekey = oekey;
this.stockoutdate= stockoutdate;
this.canorder= canorder;
this.incart= incart;
this.inlist= inlist;
}
function typedef_selectedswatch(categoryid, collectionid, swatchid, stockoutdate) {
this.categoryid = categoryid;
this.collectionid = collectionid;
this.swatchid = swatchid;
this.swatchkey = categoryid + "_" + collectionid + "_" + swatchid;
this.stockoutdate = stockoutdate;
}
function typedef_attributedata(attributeindex, attributeid, attributetype, attributename, attributestep, hasdescriptiontext, attributeoverview, 
   attributerequired, attributeformat, attributefilename, loopstart, loopend, loopinterval, attributedefaultvalue,
attributescene7code, attributevalues, hasvalues) {
this.attributeindex = attributeindex;
this.attributeid = attributeid;
this.attributetype= attributetype;
this.attributename = attributename.toLowerCase();
this.attributestep = attributestep;
this.hasdescriptiontext = hasdescriptiontext;
this.attributeoverview= attributeoverview;
this.attributerequired = attributerequired;
this.attributeformat = attributeformat;
this.attributefilename= attributefilename;
this.loopstart= loopstart;
this.loopend= loopend;
this.loopinterval= loopinterval;
this.attributedefaultvalue = attributedefaultvalue;
this.attributedefaultvalueraw= attributedefaultvalue; 
this.attributescene7code = attributescene7code;
this.attributevalues = attributevalues;
this.hasvalues= hasvalues;
}
function typedef_attributecategorydata(attributeindex, attributeid, attributetype, categoryid, attributestep, hasdescriptiontext, attributedesc, attributemirrorattributeid) {
this.attributeindex = attributeindex;
this.attributeid = attributeid;
this.attributetype= attributetype;
this.categoryid= categoryid;
this.attributestep= attributestep; 
this.hasdescriptiontext = hasdescriptiontext;
this.attributemirrorattributeid= attributemirrorattributeid;
}
function typedef_valueid(valueid, name, isdefault, scene7code, filename) { 
this.valueid = valueid;
this.name = name;
this.isdefault = isdefault;
this.scene7code = scene7code;
this.filename= filename;
}
function typedef_attributeparent(type, parentid, value, isor, isnot, selected) { 
this.type = type;
this.parentid = parentid;
this.value = value;
this.isor = isor;
this.isnot = isnot;
this.selected = selected;
}
     