var gblPopupTest = false;
var gblAFSCartSelections = new Array();
var gblAFSDomainLocation = "../";
var gblAFSMenuCurrentUID = "";
//Width for building out menus
var gblAFSMenuCurrentWidth = 110;
function jsuAFSLayoutResize(p_iMax) {
return jsuAFSLayoutResizeEx(p_iMax, true);
}
function jsuAFSLayoutResizeEx(p_iMax, p_bFull) {
var ifr = document.getElementById("AFSStoreFrame");
//var oCell = document.getElementById("AFSStoreCell");
//var oMenu = document.getElementById("AFSStoreMenu");
//var oPackage = document.getElementById("dvMenuPackages");
var ifrmFrame = window.frames["AFSStoreFrame"];
if (ifrmFrame) {
var ifrmDoc = null;
try {
ifrmDoc = ifrmFrame.document;
} catch (e) { return false };
if(ifrmDoc) {
var oRefs = ifrmDoc.getElementById("dvDisplayReferences");
if(p_bFull) {
try {
if(document.all) {
//ifrmDoc.createStyleSheet('http://production.trios.y3k2.com/Clients/DYHomeDecor/DYHomeDecor.com.u/DYHomeDecorStyle.css');
ifrmDoc.createStyleSheet(gblAFSDomainLocation + 'DYHomeDecorStyle.css');
} else {
var oLink = ifrmDoc.createElement("link");
oLink.rel = "stylesheet";
oLink.type = "text/css";
//oLink.href = "http://production.trios.y3k2.com/Clients/DYHomeDecor/DYHomeDecor.com.u/DYHomeDecorStyle.css";
oLink.href = gblAFSDomainLocation + "DYHomeDecorStyle.css";
ifrmDoc.body.appendChild(oLink);
}
ifrmFrame.jsuAFSDisplayDataType();
jsuAFSLayoutBuildLabels();
jsuAFSLayoutBuildFooter(ifrmDoc);
//alert(ifrmDoc.body.outerHTML);
//alert(3);
} catch (e) {}
var oLinkBack = null;
var oLinkNext = null;
// alert(oLinkNext.parentElement.outerHTML);
oLinkBack = ifrmDoc.getElementById("ancBackLinkTop");
oLinkNext = ifrmDoc.getElementById("ancNextLinkTop");
if(oLinkBack) oLinkBack.innerHTML = "
";
if(oLinkBack) oLinkBack.style.display = "";
if(oLinkNext) oLinkNext.innerHTML = "
";
if(oLinkNext) oLinkNext.style.display = "";
oLinkBack = ifrmDoc.getElementById("ancBackLinkBottom");
oLinkNext = ifrmDoc.getElementById("ancNextLinkBottom");
if(oLinkBack) oLinkBack.innerHTML = "
";
if(oLinkBack) oLinkBack.style.display = "";
//alert(oLinkNext.parentElement.outerHTML);
if(oLinkNext) oLinkNext.innerHTML = "
";
if(oLinkNext) oLinkNext.style.display = "";
//alert(oLinkNext.parentElement.outerHTML);
//window.setTimeout("jsuAFSLayoutResizeEx(" + String(p_iMax) + ", false);", 111);
//window.setTimeout("jsuAFSLayoutResizeEx(" + String(p_iMax) + ", false);", 1111);
//window.setTimeout("jsuAFSLayoutResizeEx(" + String(p_iMax) + ", false);", 3333);
}// End Build Full
var oBody = ifrmDoc.body;
if(oBody) {
oBody.normalize();
if(ifr) {
//ifr.scrolling = "auto";
//if(oRefs) alert(oRefs.outerHTML);
if(oRefs) oRefs.style.display = "";
if(oBody.scrollHeight > p_iMax - 20) {
ifr.height = oBody.scrollHeight + 20;
} else {
ifr.height = p_iMax;
}
}
}
try {
//alert(p_iMax);
jsuWindowOnResize();
if(ifrmDoc || false) { // Wz - Hidden to Show / Hide Menus
var ifrmFrameElement = window.document.getElementById("AFSStoreFrame");
if(String(ifrmDoc.location).indexOf("uStore.Checkout.asp") != -1) {
tblMenuLeft.style.display='none';
//if(ifrmFrameElement) {iW = Number(ifrmFrameElement.width); ifrmFrameElement.width = iW + 140 + 180;}
if(ifrmFrameElement) {
//ifrmFrameElement.style = "overflow-x:hidden;overflow-y:scroll;";
// ifrmFrameElement.width = 700 + 140 + 180; // Full Width PPP
//ifrmFrameElement.width = 700 + 140;
ifrmFrameElement.scrolling = "auto";
ifrmFrameElement.width = 700 + 140;
}
} else {
tblMenuLeft.style.display="";
if(ifrmFrameElement) {
ifrmFrameElement.width = 700;
ifrmFrameElement.scrolling = "no";
}
}
}
} catch ( e ) {}
try {
if(top) top.setTimeout("top.status = 'Ready!';", 3333);
} catch ( e ) {}
return;
if(oBody) {
oBody.normalize();
if(ifr) {
if(oRefs) oRefs.style.display = "";
oBody.normalize();
if(oBody.scrollHeight > p_iMax - 20) {
ifr.height = oBody.scrollHeight + 20;
} else {
ifr.height = p_iMax;
}
if(oCell) oCell.height = ifr.height;
}
// Build Footer
}
}
}
}
function jsuAFSCurrentYear() {
var iYearOffset = (document.all) ? 0 : 1900;
iYearOffset += (new Date()).getYear();
return iYearOffset;
}
function jsuAFSLayoutBuildLabels() {
var sText = "";
var sText0, sText1, sText2, sTextFinal, iUnits, iUnits2;
var oLabel = null;
var oCell = null;
var ifrmFrame = window.frames["AFSStoreFrame"];
if (ifrmFrame) {
var ifrmDoc = ifrmFrame.document;
if(ifrmDoc) {
//oLabel = ifrmDoc.getElementById("spAssociationsTitle");
//if(oLabel) oLabel.innerHTML = "
Coordinating Patterns
";
oLabel = ifrmDoc.getElementById("spCopyright");
if(oLabel) {
oLabel.innerHTML = "DYHomeDecor.com Copyright " + String(jsuAFSCurrentYear()) + "
" ;
//var d1 = new Date();
//if(document.all) {
//oLabel.innerHTML = "DYHomeDecor.com Copyright " + String(d1.getYear()) + "
" ;
//oLabel.innerHTML = "DYHomeDecor.com Copyright " + String(jsuAFSCurrentYear()) + "
" ;
//} else {
//oLabel.innerHTML = "DYHomeDecor.com Copyright " + String(d1.getYear() + 1900) + "
" ;
//oLabel.innerHTML = "DYHomeDecor.com Copyright " + String(jsuAFSCurrentYear()) + "
" ;
//}
}
var i = 0;
oLabel = ifrmDoc.getElementById("trUnitsMeasure");
//oLabel = ifrmDoc.getElementById("trUnitsMeasure");
if(oLabel) {
if( oLabel.length == undefined) {
jsuAFSLayoutBuildLabelUnits(oLabel);
} else {
for(i = 0; i < oLabel.length; i++) {
jsuAFSLayoutBuildLabelUnits(oLabel[i]);
}
}
}
oLabel = ifrmDoc.all("trUnitsLabel");
//oLabel = ifrmDoc.getElementById("trUnitsMeasure");
if(oLabel) {
if( oLabel.length == undefined) {
jsuAFSLayoutBuildLabelUnits(oLabel);
} else {
for(i = 0; i < oLabel.length; i++) {
jsuAFSLayoutBuildLabelUnits(oLabel[i]);
}
}
}
//inpSampleButton
oLabel = ifrmDoc.getElementById("inpSampleButton");
if(oLabel) {
oLabel.value = "Add a Sample";
}
}
}
}
function jsuAFSLayoutBuildLabelUnits(p_oLabels) {
var oLabel = p_oLabels;
var sTextFinal = "";
if(oLabel) {
//alert(oLabel.innerHTML);
var sText0 = oLabel.childNodes[0].innerHTML;
var sText1 = oLabel.childNodes[1].innerHTML;
//alert(sText0 + " .. " + sText1);
var iUnits = parseInt(String("0") + String(sText0), 10);
var iUnits2 = parseInt(String("0") + String(sText1), 10);
//alert("T:" + String(sText0) + " :: " + String(sText1));
//alert("U:" + String(iUnits) + " :: " + String(iUnits2));
sText0 = String(iUnits);
var sText = sText0 + " " + sText1;
//alert(sText0 + " :: " + sText1);
//alert(String(iUnits) + " :: " + String(iUnits2));
if(sTextFinal.length ==0) if(sText.indexOf(" unit") > 0) {
sTextFinal = sText1.replace("unit", "Each");
}
if(sTextFinal.length ==0) if(sText.indexOf(" yd") > 0) {
if( iUnits2 > 1) {
sTextFinal = sText0 + " " + sText1.replace("yd", "Yards");
} else {
sTextFinal = sText1.replace("yd", "Yard");
}
}
if(sTextFinal.length ==0) if(sText.indexOf("lyd") > 0) {
if( iUnits2 > 1) {
sTextFinal = sText0 + " " + sText1.replace("lyd", "Linear Yards");
} else {
sTextFinal = sText1.replace("lyd", "Linear Yard");
}
}
if(sTextFinal.length ==0) if(sText.indexOf("linear yard") > 0) {
if( iUnits2 > 1) {
sTextFinal = sText0 + " " + sText1.replace("linear yard", "Linear Yards");
} else {
sTextFinal = sText1.replace("linear yard", "Linear Yard");
}
}
if(sTextFinal.length ==0) if(sText.indexOf("each") > 0) {
sTextFinal = sText1.replace("each", "Each");
}
//if(sTextFinal.length != 0 && iUnits > 1) sTextFinal += "s";
if(sTextFinal.length ==0) if(sText.indexOf(" in") > 0) {
sTextFinal = sText0 + " " + sText1.replace(" in", " Inch");
}
if(sTextFinal.length ==0) if(sText.indexOf(" ft") > 0) {
//alert(String(sTextFinal) + " :: " + sText1 + " :: " + String(sText1.length));
sTextFinal = sText0 + " " + sText1.replace("ft", "Feet");
//alert(String(sTextFinal) + " :: " + sText + " :: " + String(sText.length));
}
//alert(sText + " == " + sTextFinal);
if(sTextFinal.length ==0) {
switch(iUnits) {
case 1: sTextFinal = "Single Roll"; break;
case 2: sTextFinal = "Double Roll"; break;
case 3: sTextFinal = "Tripple Roll"; break;
case 4: sTextFinal = "Quadruple Roll";break;
case 5: sTextFinal = "Pentuple Roll"; break;
}
}
sText2 = "per " + sTextFinal;
oLabel.childNodes[1].innerHTML = "";
oLabel.childNodes[0].innerHTML = sText2;
oLabel.style.display = "";
}
}
function jsuAFSLayoutBuildMenus(p_UID) {
var i = 0; var ar1 = null; var sOut, s0, s1, s2;
sOut = s0 = s1 = s2 = "";
if (p_UID == undefined) { // Won't work right now.
gblAFSMenuCurrentUID = "";
for(i = 0; i < gblAFSMenuProducts.length; i++) {
ar1 = String(gblAFSMenuProducts[i]).split(",=,");
if(s1.length > 0) s1 += ",";
s1 += ar1[0];
}
} else {
gblAFSMenuCurrentUID = p_UID;
i = jsuAFSLayoutLookupMenus(p_UID);
if(i != -1) {
ar1 = String(gblAFSMenuProducts[i]).split(",=,");
s1 = ar1[3];
}
}
//sOut += jsuAFSLayoutBuildLevel(s0, s1, 0, 0);
if(s1.length > 0) sOut += jsuAFSLayoutBuildLevel("", s1, 0, 0);
return sOut;
}
function jsuAFSLayoutBuildLevel(p_UID, p_UIDList, p_iRow, p_iLevel) {
var sL2Out, sLOut, sUIDList, sVisible, sPosition, sTop, sName;
sVisible = sPosition = sName = sTop = sL2Out = sLOut = "";
var aUID, sUID;
var i, j, iIndex, iRow, iLevel;
var ar1 = null;
i = 0;
iRow = parseInt(p_iRow, 10);
iLevel = parseInt(p_iLevel, 10);
if(p_UID == "") {
p_UID = "dvAFSMenuMain";
sName = "base";
iIndex = 0;
sVisible = "visibility:visible;";
//sVisible = "visibility:visible";
sPosition = "position:relative; ";
} else {
//iIndex = jsuAFSLayoutLookupMenus(p_UID) ;
iIndex = 0;
sName = String(p_iLevel) + p_UID;
sVisible = "display:none;";
//sVisible += "visibility:visible;";
//sVisible = "visibility:hidden";
sPosition = "position:absolute; ";
//sPosition = "position:relative; ";
sTop = "top: 0px;";
}
sPosition = "";
sLOut += "" + "\n";
//gblAFSMenuCurrentWidth = 150;
// FILL Resize for Browser Make
var offsetH = 14; // MOZ
if(document.all) offsetH += 10; // IE
if(p_iRow > 0) for(var j = 0; j < p_iRow; j++) { sLOut += "
\n"; }
//else for(var j = 0; j < p_iRow + 1; j++) { sLOut += "
\n"; }
//alert(p_UIDList);
aUID = p_UIDList.split(",");
for(i = 0; i < aUID.length; i++) {
sUID = aUID[i];
if(sUID.length > 10) {
iIndex = jsuAFSLayoutLookupMenus(sUID) ;
//alert(iIndex);
if(iIndex != -1) { // Item or Package
//sLOut += "
";
sLOut += "
";
ar1 = String(gblAFSMenuProducts[iIndex]).split(",=,");
sUIDList = ar1[3];
if(sUIDList.length != 0) {
sLOut += jsuAFSLayoutBuildAnchor(sUID, ar1[2], ar1[1], iLevel, true); // + "\n";
if(gblAFSMenuCurrentUID.indexOf(sUID) == -1) {
gblAFSMenuCurrentUID += sUID + ",";
sL2Out += jsuAFSLayoutBuildLevel(sUID, sUIDList, iRow, iLevel+1);
gblAFSMenuCurrentUID = gblAFSMenuCurrentUID.replace(sUID + ",", "");
}
} else {
sLOut += jsuAFSLayoutBuildAnchor("", ar1[2], ar1[1], iLevel, false); // + "\n";
}
sLOut += "
" + "\n";
iRow++;
}
}
}
//sLOut += "
\n
" + "\n\n" + sL2Out;
sLOut += "
" + "\n\n" + sL2Out;
//alert (sLOut);
return sLOut;
}
//Build out the menu
function jsuAFSLayoutBuildAnchor(p_UID, p_sAnchor, p_sTitle, p_iLevel, p_bChild) {
//return "" + p_sTitle + "";
//return "" + p_sTitle + "";
var sChild = "";
if(p_bChild) sChild = " >";
//if(p_UID.length > 0) return "" + p_sTitle + sChild + "";
//return "" + p_sTitle + sChild + "";
if(p_UID.length > 0) return "" + p_sTitle + sChild + "";
return "" + p_sTitle + sChild + "";
//
//if(p_UID.length > 0) return "" + p_sTitle + sChild + "";
//return "" + p_sTitle + sChild + "";
}
function jsuAFSLayoutLookupMenus(p_UID) {
for(var i = 0; i < gblAFSMenuProducts.length; i++) {
if(String(gblAFSMenuProducts[i]).indexOf(p_UID) == 0) return i;
}
return -1;
}
function jsuAFSLayoutLookupAnchor(p_UID) {
var idx = jsuAFSLayoutLookupMenus(p_UID);
if(idx != -1) {
ar1 = String(gblAFSMenuProducts[i]).split(",=,");
//s0 += "" + ar1[1] + "
";
return jsuAFSLayoutBuildAnchor(ar1[2], ar1[1]);
}
return "";
}
function jsuAFSLayoutIndexAnchor(p_Index, p_iLevel) {
if(p_Index > -1 && p_Index < gblAFSMenuProducts.length) {
ar1 = String(gblAFSMenuProducts[p_Index]).split(",=,");
//s0 += "" + ar1[1] + "
";
return jsuAFSLayoutBuildAnchor(ar1[2], ar1[1], p_iLevel);
}
return "";
}
function jsuAFSLayoutBuildFooter(p_Doc) {
var sPageCount, sPageCurrent, sPageResultSize, sPageResultCount;
var iPageCount, iPageCurrent, iPageResultSize, iPageResultCount;
var sHTMLData = "";
var sOut = "";
var oBody = p_Doc.getElementById("body");
if (oBody == null) return;
//var oHead = p_Doc.getElementById("dvStoreHeader");
var oHead = p_Doc.getElementById("dvStoreHeader");
var oFoot = p_Doc.getElementById("dvStoreFooter");
//alert(oFoot.outerHTML);
if(document.all) { //IE
sPageCount = oBody["UPRPageCount"];
sPageCurrent = oBody["UPRPageCurrent"];
sPageResultSize = oBody["UPRPageResultSize"];
sPageResultCount = oBody["UPRPageResultCount"];
} else { // Moz
sPageCount = oBody.getAttribute("UPRPageCount");
sPageCurrent = oBody.getAttribute("UPRPageCurrent");
sPageResultSize = oBody.getAttribute("UPRPageResultSize");
sPageResultCount = oBody.getAttribute("UPRPageResultCount");
//sPageCount = oBody["uprpagecount"];
//sPageCurrent = oBody["uprpagecurrent"];
//sPageCount = oBody["UPRPageCount"];
//sPageCurrent = oBody["UPRPageCurrent"];
}
//sOut += "
s1: " + String(sPageCurrent);
//sOut += "
s2: " + String(sPageCount);
if(sPageCount == undefined) sPageCount = 0;
if(sPageCurrent == undefined) sPageCurrent = 0;
if(sPageResultCount == undefined) sPageResultCount = 0;
if(sPageResultSize == undefined) sPageResultSize = 12;
iPageCount = Number(sPageCount);
//alert(iPageCount);
//iPageCurrent = parseInt(sPageCurrent, 10);
iPageCurrent = Number(sPageCurrent);
iPageResultCount = Number(sPageResultCount);
iPageResultSize = Number(sPageResultSize);
//alert(iPageCurrent);
//alert(sPageCurrent);
//alert(sPageResultCount);
//alert(sPageResultSize);
//sHTMLData = "Hello World";
sHTMLData = "";
//sOut += "
i1: " + String(iPageCurrent);
//sOut += "
i2: " + String(iPageCount);
sOut = "";
//if( iPageCount > 1) sOut += "
";
sOut += "";
sOut += "";
//if( iPageCount > 1) {
sSelection = String(iPageResultSize);
sOut += "| Items Per Page: | ";
sOut += " | ";
//}
var iItemCountFirst = iPageCurrent * iPageResultSize - iPageResultSize + 1;
var iItemCountLast = iPageCurrent * iPageResultSize;
if(iPageResultCount < iItemCountLast) iItemCountLast = iPageResultCount;
sOut += "" + String(iItemCountFirst) + " -" + String(iItemCountLast) + " of " + String(iPageResultCount) + " Total | Page " + String(iPageCurrent) + " of " + String(iPageCount) + " | ";
/*
alert(iPageCurrent);
alert(iItemCountLast);
alert(iPageResultSize);
alert(iPageResultCount);
*/
if(iPageCurrent > 1) sOut += "Back | ";
if( iPageCount > 1) sOut += "" + jsuAFSLayoutBuildFooterPageLinks(iPageCount, iPageCurrent) + " | ";
if(iPageCurrent < iPageCount) sOut += "Next | ";
//alert("Next | ");
sOut += " ";
sOut += " |
"; // Outter Table
//sHTMLData += "" + sOut + "";
//oHead.innerHTML =
if(oHead) {
oHead.innerHTML = sHTMLData + "" + sOut;
}
sOut = "";
sOut += "";
if(iPageCurrent > 1) sOut += "| Back | ";
if( iPageCount > 1) sOut += "" + jsuAFSLayoutBuildFooterPageLinks(iPageCount, iPageCurrent) + " | ";
if(iPageCurrent < iPageCount) sOut += "Next | ";
sOut += "
";
//alert(iPageCurrent);
//alert(iPageCount);
//alert(sOut);
if(oFoot) {
oFoot.innerHTML = sHTMLData + sOut;
}
}
function jsuAFSLayoutBuildFooterPageLinks(p_iTotal, p_iSelected) {
var sOut = "";
var sShort = "";
var iSelected = Math.round(Number(p_iSelected) - 1);
var iTotal = Math.round(Number(p_iTotal));
if(iTotal < Number(p_iTotal)) iTotal++;
var i, j, k, iWidth, iStep, iStart, iStop, bFound;
bFound = false;
iWidth = 3;
iStart = Math.round( iSelected - iWidth);
iStop = Math.round( iSelected + iWidth + 1);
if(iStop > iTotal ) {
iStart -= Math.round(iStop - iTotal);
iStop = iTotal + 1;
}
if(iStart < 0) {
iStop += Math.abs(iStart);
iStart = 0;
}
//sOut += "Selected:" + String(iSelected) + "
";
//sOut += "Total:" + String(iTotal) + "
";
//sOut += "iStart:" + String(iStart) + "
";
//sOut += "iStop:" + String(iStop) + "
";
//sOut += "Total:" + String(p_iTotal) + "
";
//sShort = "";
iStep = 10;
//if(iTotal < iStep) iStep = 5;
var bFirst, bLast;
var sFirst, sLast;
bFirst = bLast = false;
sFirst = sLast = "";
var sFont = " style='font-Size:10pt;' ";
sOut += "";
//alert(sOut);
return sOut;
}
function jsuAFSDisplayCartUpdate(p_ItemsArray) {
//gblAFSCartSelections
try {
if(p_ItemsArray.length == undefined) return;
var iLen = p_ItemsArray.length;
var iItem, iItems, dPrice, aItem, sDat;
iItems = dPrice = 0;
for(var i = 0; i < iLen; i++) {
//if(gblAFSCartSelections[i].indexOf(p_UID) != -1) return;
aItem = String(gblAFSCartSelections[i]).split(",=,");
if(aItem.length) {
iItem = Number("0" + aItem[1]);
iItems += iItem;
if(String(gblAFSCartSelections[i]).indexOf("0SSPCARTDATAPLACEHOLDER000000000") == -1) {
sDat = aItem[2];
sDat = sDat.replace("$", "");
sDat = sDat.replace(",", "");
dPrice += iItem * Number("0" + sDat);
} else {
sDat = aItem[2];
sDat = sDat.replace("$", "");
sDat = sDat.replace(",", "");
dPrice += Number("0" + sDat);
}
}
}
//alert(iItems);
//alert(dPrice);
//jsuAFSCurrency
var oQty = top.document.getElementById("dispItemsQty");
var oPrice = top.document.getElementById("dispItemsPrice");
//oQty.innerText = String(iItems);
//oPrice.innerText = jsuAFSCurrency(dPrice);
oQty.innerHTML = String(iItems);
oPrice.innerHTML = jsuAFSCurrency(dPrice);
} catch (e) { }
}
function jsuAFSDisplayCalculator() {
window.open("../Help/_calc_select.htm", "DYHDCalc", "width=500, height=500, toolbar=no, menu=no");
}
function jsuAFSDisplayFrameURL(p_sURL) {
var oFrm = top.document.frames["AFSStoreFrame"];
if(oFrm) oFrm.src = p_sURL;
// window.open(p_sURL, "DYHDCalc", "width=300, height=300, toolbar=no, menu=no");
}
function jsuResizeLargeImage(p_Size ) {
/*
0 - fit
1 - 25%
2 - 50%
3 - 100%
*/
var dx = 1;
oImg = document.getElementById("imgEnlargeView");
if(oImg) {
switch(p_Size) {
case 0:
dx = (window.document.body.scrollWidth - 6) / Number(oImg["W"]);
oImg.width = Math.round( Number(oImg["W"]) * dx );
oImg.height = Math.round( Number(oImg["H"]) * dx );
break;
case 1:
dx = 0.25;
oImg.width = Math.round( Number(oImg["W"]) * dx );
oImg.height = Math.round( Number(oImg["H"]) * dx );
break;
case 2:
dx = 0.5;
oImg.width = Math.round( Number(oImg["W"]) * dx );
oImg.height = Math.round( Number(oImg["H"]) * dx );
break;
case 3:
oImg.width = Math.round( Number(oImg["W"]) * dx );
oImg.height = Math.round( Number(oImg["H"]) * dx );
break;
case 4:
oImg.width = Math.round( Number(oImg["W"]) * 2 );
oImg.height = Math.round( Number(oImg["H"]) * 2 );
break;
}
}
}
var gblbIgnoreEvent = false;
function jsuCloseLargeImage() {
if(gblbIgnoreEvent == false) {
var tbl = document.getElementById("ProductLargeImageView");
if(tbl) jsuAFScRemoveNode(tbl);
window.onresize = "";
} else {
gblbIgnoreEvent = false;
}
}
function jsuLoadLargeImage(p_Doc) {
var sTableOutput = "";
var oTop = window.top;
var oBody = top.document.body;
var oData = p_Doc.getElementById("uItem.uDisplay.uMedia.Image.Large.Value")
//var sPath = "\\Webdata\\Inventory\\Images\\" + oData.innerText;
var sPath = "\\Webdata\\Inventory\\Images\\" + oData.innerHTML;
var oArray = new Array();
oData = p_Doc.getElementById("uItem.uDisplay.uMedia.Title.Value")
oArray[0] = oData.innerHTML;
oData = p_Doc.getElementById("uItem.uDetails.Pattern.Value")
oArray[1] = oData.innerHTML;
oData = p_Doc.getElementById("uItem.uDetails.ItemType.Value")
oArray[2] = oData.innerHTML;
oData = p_Doc.getElementById("uItem.uDetails.Brand.Value")
oArray[3] = oData.innerHTML;
oData = p_Doc.getElementById("uItem.uDetails.Collection.Value")
oArray[4] = oData.innerHTML;
var dDate = new Date();
var sTable = "";
sTable += "| ";
//sTable += "Enlarged View of " + oArray[0] + " " + oArray[2] + " by " + oArray[3] + " © " + String((new Date()).getYear()) + " DY Home Decor |
";
sTable += "Enlarged View of " + oArray[0];
if(String(oArray[0]).indexOf(oArray[2]) < 0) {
sTable += " " + oArray[2] ;
}
sTable += " by " + oArray[3] + " © " + String(jsuAFSCurrentYear()) + " DY Home Decor";
sTable += "";
sTable += "";
sTable += "| Title: | " + oArray[0] + " | ";
sTable += "
";
if(oArray[0] != oArray[1]) {
sTable += "";
sTable += "| Item: | " + oArray[1] + " | ";
sTable += "
";
}
sTable += "";
sTable += "| Type: | " + oArray[2] + " | ";
sTable += "
";
if(oArray[3] != oArray[4]) {
sTable += "";
sTable += "| Brand: | " + oArray[3] + " | ";
sTable += "
";
}
sTable += "";
sTable += "| Collection: | " + oArray[4] + " | ";
sTable += "
";
sTable += "
";
// sTable += "";
// sTable += "| Image Size: | [Small][Scale][Large]
| ";
// sTable += "
";
sTable += "";
sTable += "";
sTable += "";
sTable += "Click anywhere on the page to close this view.
| ";
sTable += "
";
sTable += "
";
//alert(sTable);
//oBody.insertAdjacentHTML("AfterBegin", "
");
var oTbl = document.createElement("TABLE");
oTbl.id = oTbl.name = "ProductLargeImageView";
//alert(1.1);
//oTbl.onclick = "var tbl = document.getElementById(\"ProductLargeImageView\"); if(tbl) tbl.r_emoveNode(true);";
oTbl.onclick = jsuCloseLargeImage;
//alert(1.2);
window.onresize = jsuCloseLargeImage;
//alert(1.3);
var oRow = oTbl.insertRow(-1);
//alert(1.4);
var oCell = oRow.insertCell(-1);
//alert(1.5);
oCell.height = 1;
//oTbl.width = 500;
//alert(1.6);
oTbl.width = document.body.clientWidth;
//oTbl.height = 500;
//alert(1.7);
var iHeight = document.body.clientHeight;
//alert(1.8);
if(top.document.body.scrollHeight > iHeight) iHeight = top.document.body.scrollHeight;
//alert(1.9);
//alert(top.document.body.scrollHeight);
//alert(top.document.body.clientHeight);
oTbl.height = iHeight;
//alert(iHeight);
oTbl.style.position = "absolute";
oTbl.style.zIndex = 1000;
sTableOutput = "";
//oTbl.style.top =-2;
oTbl.style.top =0;
oTbl.style.left = 0;
//oTbl.border = 1;
//oCell.height = 100;
oCell.style.backgroundColor = "#91A172";
oCell.style.align="left";
oCell.innerHTML = sTable;
oRow = oTbl.insertRow(-1);
oCell = oRow.insertCell(-1);
// window.onresize = "";
oTbl.style.backgroundImage = "url(WebImages\\ImageLarge_Background5.gif)";
// alert(document.body.clientWidth);
//var sData = "
";
var sData = "
";
//alert(sData);
//alert(oCell.outerHTML);
//oCell.innerHTML = "
"
//oCell.insertAdjacentHTML("AfterBegin", sData);
oCell.style.textAlign="left";
oCell.style.verticalAlign="top";
oCell.innerHTML = sData;
oRow = oTbl.insertRow(-1);
oCell = oRow.insertCell(-1);
sTable = "";
sTable += "";
sTable += "";
sTable += " | Click anywhere on the page to close this view.
| ";
sTable += "
";
sTable += "
";
sTable += "| ";
sTable += "Enlarged View of " + oArray[0] + " " + oArray[2] + " by " + oArray[3] + " © " + String(jsuAFSCurrentYear()) + " DY Home Decor |
";
oCell.style.backgroundColor = "#91A172";
oCell.style.align="center";
oCell.style.verticalAlign="top";
oCell.innerHTML = sTable;
oCell.height = 35;
if(document.all) {
oBody.insertAdjacentElement("AfterBegin", oTbl);
//oBody.insertAdjacentHTML("AfterBegin", sTableOutput + oTbl.innerHTML + "
");
} else {
sTableOutput += oTbl.innerHTML + "";
var r = oBody.ownerDocument.createRange();
r.setStartBefore(oBody);
var parsedHTML = r.createContextualFragment(sTableOutput);
oBody.insertBefore(parsedHTML, oBody.firstChild);
}
//alert(-99);
}
function jsuClearPage() {
var oForm = document.forms["frmAFSSearch"];
if(oForm) {
oForm.reset();
if(oForm.inpKeywords) oForm.inpKeywords.value = "";
if(oForm.inpPattern) oForm.inpPattern.value = "";
//alert(1);
if(oForm.selBookName) oForm.getElementById("selBookName").selectedIndex = 0;
//alert(2);
if(oForm.selStyleDesigner) oForm.selStyleDesigner.selectedIndex = 0;
if(oForm.selCategory) oForm.selCategory.selectedIndex = 0;
if(oForm.selManufacturer) oForm.selManufacturer.selectedIndex = 0;
if(oForm.selDesign) oForm.selDesign.selectedIndex = 0;
if(oForm.selColor) oForm.selColor.selectedIndex = 0;
}
}