﻿//Open Enlarge Image in new window
function openEnlargeImage(strURL){    
    myPage = window.open(strURL,"imgLarge","height=420, width=600, scrollbars=no,status=no,toolbar=no,menubar=no");
}

//Open Giant Image in new window
function openGiantImage(strURL){    
    myPage = window.open(strURL,"imgLarge","height=560, width=700, scrollbars=no,status=no,toolbar=no,menubar=no");
}

//Open Enlarge Custom in new window
function openEnlargeCustom(strURL){    
    myPage = window.open(strURL,"imgCustLarge","height=420, width=650, scrollbars=no,status=no,toolbar=no,menubar=no");
}

//Open Enlarge WS Custom in new window
var myPage
function openEnlargeWSCustom(strURL,strWidth){
//    myPage = window.open(strURL,"imgCustLarge","height=420, width=1125, scrollbars=no,status=no,toolbar=no,menubar=no");
	if(myPage && !myPage.closed) {
	    myPage.close();
	}
    myPage = window.open(strURL,"imgCustWSLarge","height=420, width=" + strWidth + ", scrollbars=no,status=no,toolbar=no,menubar=no");
}

//Open external URL in new window
function openURL(strURL){    
    myPage = window.open(strURL,"newurl","");
}

//Open PDF in new window
function openPDF(strURL){    
    //myPage = window.open(strURL,"pdfLarge","height=550, width=400, scrollbars=yes,status=no,resizable=yes,toolbar=no,menubar=no");
    myPage = window.open(strURL,"pdfLarge","scrollbars=yes,status=no,resizable=yes,toolbar=no,menubar=no");
}

//Swaps the large fabric image
function swapFabric(imgObject, imgName, imgPath, spnNumber, colorNumber, spnName, colorName){
    if(document.getElementById){
        document.getElementById(imgObject).src = imgPath + imgName;
        document.getElementById(spnNumber).innerHTML = colorNumber;
        document.getElementById(spnName).innerHTML = colorName;
    }
}

//Swaps the portfolio image
function swapPortfolio(imgObject, imgName){
    if(document.getElementById){
        document.getElementById(imgObject).src = imgName;        
    }
}

//controls top navigation rollover
function swapNavigation(imgObject, imgName){
    if(document.getElementById){
        document.getElementById(imgObject).src = imgName;
    }
}
