/* ********************************************************************************************* *
 * Adding Appropriate Links and Scripts to the Document Head for the configurator Model.asp page *
 * ********************************************************************************************* */

/*
 * This is for the NEW configurator Model page, created 2010
 * -Leland
*/


/* adds a link to configurator.css to the head, instead of inline, so it validates */
	var headElement = document.getElementsByTagName("head")[0];
	linkElement=document.createElement("link");
	linkElement.href="../scripts/configurator/master/configurator.css";
	linkElement.rel="stylesheet";
	headElement.appendChild(linkElement);

/* check if JQuery is loaded... if not, load it. */
if (typeof jQuery != 'undefined') {
	//alert("yes");
	/* jQuery is already loaded... verify minimum version number of 1.4.2 and reload newer if needed */
	if (/1\.(0|1|2|3|4)\.(0|1)/.test(jQuery.fn.jquery) || /^1.1/.test(jQuery.fn.jquery) || /^1.2/.test(jQuery.fn.jquery)|| /^1.3/.test(jQuery.fn.jquery)) {
		//alert("double-yes");
		loadJQ();
	}
} else {
	//alert("no");
	loadJQ();
}

/* loads jQuery if not already loaded, or if not a recent enough version */
function loadJQ() {
	/*document.write('<script type="text/javascript" src="../scripts/configurator/master/jquery.min.js"></script>')*/
	document.write('<script type="text/javascript" src="../scripts/lib/jquery.min.js"></script>')
}
