// JavaScript Document
// Copies passed text to the clipboard
	function copyToClipboard(text) {
		var range = document.body.createTextRange();
		range.findText(text);
		range.select();
		document.execCommand("Copy");
		document.execCommand("Unselect");
	}
	
popUpWin = "nowin";
function popWin(name, file, width, height, status, resizable, scrollable) {
	var h=height;
	var w=width;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status='+status+',resizable='+resizable+',scrollbars='+scrollable;
	popUpWin = window.open( file , name, winprops );
	popUpWin.focus();
}

function closePopUp() {
	if( popUpWin != "nowin" ) {
		if( !popUpWin.closed ) {
			popUpWin.close();
		}
	}
}


function swapImage(imgID, newSrc, newAlt ) {
	var currImg = document.getElementById('productImg')
	currImg.src = newSrc;
	currImg.alt = newAlt;
	currImg.title = newAlt;
	return false;
}
function preloadImage(imgSrc) {
	//var objImage = new Image();
	var objImage = document.createElement("img");
	objImage.src = imgSrc;
	return objImage;
}