function popUpOrder(strURL) {

	popUpCenter(strURL, 'ViacairnOrder', 750, 550);	
}

function popUpResourceDesc(strURL) {

	popUpCenter(strURL, 'Resources', 400, 300);	
}

function popUpCenter(strURL, strWindowName, intWidth, intHeight) {
	// get center of browser window
	var browserWidth = GetBrowserWidth() / 2
	var browserHeight = (GetBrowserHeight() / 2)-50		//slide the window up just a bit from center
	var objWindow;
	
	objWindow = window.open(strURL, strWindowName, 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0, width=' + intWidth + ',height=' + intHeight + ',top=' + (window.screenTop + (browserHeight - (intHeight/2))) + ',left=' + (window.screenLeft + (browserWidth - (intWidth/2))))     	
	//objWindow.focus()
		
	if (objWindow.opener == null) {
		objWindow.opener = self;
	}
	objWindow.focus();
		
	if (typeof(strWindowName) != "undefined") {
		objWindow.focus();
	}
}

// utils

function GetBrowserWidth() {
	if (navigator.userAgent.indexOf("MSIE") > 0){
		return(document.body.clientWidth);
	}
	else {
		return window.outerWidth;
	}
}

function GetBrowserHeight() {
	if (navigator.userAgent.indexOf("MSIE") > 0) {
		return(document.body.clientHeight);
	} 
	else {
		return(window.outerHeight);
	}
}

function ClosePopUp(){
	self.close();
	window.opener.focus();
}
