// Function: S7ConfigObject()
// Purpose: Constructor for the S7ConfigObject class
// Param: None
// Output: A new instantiated S7ConfigObject instance
// Notes: No need to use this function explicitly
function S7ConfigObject()
{
	this.isVersion = "2.8";
	this.isViewerRoot = "https://s7d1.scene7.com/s7viewers";
	this.isRoot	 = "https://s7d3.scene7.com/is/image/";
	/*if (location.protocol == "https:") {
		this.isViewerRoot = "https://s7d1.scene7.com/s7viewers";
		this.isRoot	 = "https://s7d3.scene7.com/is/image/";
    } */
}

// Set up an isolated Scene7 namespace to copy the global variables in this file to.
// This helps to understand what these variables are in other files.
if (!window.viking) {
	window.viking = {};
}
if (!window.viking.scene7) {
	window.viking.scene7 = {};
}

var S7ConfigClient = new S7ConfigObject();
var company="VikingRange";
var modifiers = "";

// Copy these global variables into a more isolated container. It's still global, but not in the top scope.
window.viking.scene7.S7ConfigClient = S7ConfigClient;
window.viking.scene7.company = company;
window.viking.scene7.modifiers = modifiers;

function docWrite(line) {
    document.write(line);
}

sj_codebase = S7ConfigClient.isViewerRoot + "/html5/js/";
docWrite('<script type="text/javascript" src= " ' + sj_codebase + 'BasicZoomViewer.js"><\/script>');

function changeImage(image){
	var imageRoot = S7ConfigClient.isRoot;
    var url = "";
	if(imageServer == 'VikingRangeRender') {
        url = imageRoot + company + '/' + image + modifiers;	
		zoomViewer.setAsset(company + '/' + image);
	} else {
        url = imageRoot + company + '/' + image + modifiers;
        zoomViewer.setAsset(company + '/' + image + modifiers);
	}

    // Let anything that is interested in this know that that image url changed.
    $(window).triggerHandler("scene-7-image-changed", {
        url: url
    });
}