// function used to open a new child window
var SelectionWindow = null;
function openWindow(url, width, height) {
	var winWidth = (width);
	var winHieght = (height);
	var winl = (screen.width - winWidth) / 2;
	var wint = (screen.height - winHieght) / 2;
    winStats='toolbar=no,location=no,directories=no,menubar=no,'
    winStats+='scrollbars=yes,width='+winWidth+',height='+winHieght
		if (navigator.appName.indexOf("Microsoft")>=0) {
          	winStats+=',left='+winl+',top='+wint
 		}else{
       		winStats+=',screenX='+winl+',screenY='+wint
		}
		
		if (!SelectionWindow || SelectionWindow.closed){
			SelectionWindow = window.open(url,"NewWindow",winStats);
		}else{
			SelectionWindow.focus();
		}  
		 
		if (SelectionWindow.opener == null){
			SelectionWindow.opener = self
		} 
		
    }
	
/* used in onunload of the page to clean up any child windows that were launched by the above function... */
function CloseExistingPopup(){
	if (SelectionWindow.name == "NewWindow"){
		SelectionWindow.close();
	}
}

function getEnlargedImage(imgPath, imgName, imgBrand){
	var windowWidth = document.documentElement.clientWidth || document.body.clientWidth;
    var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
	var myImgURL = "faq/enlarge.asp?ImagePath=" + imgPath + "&ImageName=" + imgName + "&Brand=" + imgBrand
	if (!myImageContainer){
		var myImageContainer = document.createElement('DIV');
	}
	
	myImageContainer.id = "myImageContainer"
	hoverInfoContent.appendChild(myImageContainer)
	ajaxFunction(myImgURL, "myImageContainer")
	showMessage(hoverInfoContent.innerHTML,(windowWidth-100), (windowHeight-100))
}