//handles launch of separate browser
//The Windows tool bar is 24 pixels high
//I have also found that IE thinks the available width is 10 pixels less than
//it should be on 800x600 mode
var windowsHOffset=24;
var windowsWOffset=10;
function tearoff (url, name, width, height, left, top) {
	if(width>(screen.availWidth-windowsWOffset) || height>(screen.availHeight-windowsHOffset)) {
		return(tearoffWithScroll(url,name,width,height,left,top));
	}
	return (tearoff_WindowOpen(url, name, width, height, left, top, 'no', 'no', 'yes'));
}  

function tearoff_WindowOpen (url, name, width, height, left, top, scrollbars, menubar, resizable) {
	if(width>(screen.availWidth-windowsWOffset)){
		width=screen.availWidth-windowsWOffset;
	}
	if(height>(screen.availHeight-windowsHOffset)){
		height=screen.availHeight-windowsHOffset;
	}
	var tearWin = window.open(url, name, 
'personalbar=no,toolbar=no,status=no,scrollbars=' + scrollbars + ',location=no,resizable=' + resizable + ',menubar=' + menubar + 
',width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
	if(window.focus) {
		tearWin.focus();
	} 
	return(tearWin);
}  

function tearoffWithScroll (url, name, width, height, left, top) {
	
	return (tearoff_WindowOpen(url, name, width, height, left, top, 'yes', 'no', 'yes'));
}

function tearoffWithScrollAndMenu (url, name, width, height, left, top) {
	
	return (tearoff_WindowOpen(url, name, width, height, left, top, 'yes', 'yes', 'yes'));
}

function tearoffWithScrollNoresize (url, name, width, height, left, top) {
	return (tearoff_WindowOpen(url, name, width, height, left, top, 'yes', 'no', 'no'));

}
////////////////////////////////////////////////////////
//Following method not completed yet.  Don't know if it will be needed
/*
function webrShowModalDialog(URL,arguments,features){
	var feaArr
	if(features){
		var i;
		feaArr=features.toLowerCase().split(";");
		for(i=0;i<feaArr.length;i++){
			var thisFeature=feaArr[i];
			var valArr=thisFeature.split(":");
			switch(valArr[i]){
				case "dialogheight":
				case "dialogwidth":
				case "dialogtop":
				case "dialogleft:
				case "center":
				case "scroll":				
			}
		}
	}
}
*/