function TSOpenWindow(URL,windowWidth, windowHeight, windowResizable, windowMenubar, windowScrollbars, windowStatus, windowToolbars) {
	var TSWindow = "";
	var tsHeight=0;
	var tsWidth=0;
	var increment=7;
	var windowFeatures;
	var left, top;
	
	if(!Number(windowWidth))
		windowWidth = window.screen.availWidth;
	if(!Number(windowHeight))
		windowHeight = window.screen.availHeight;
	
	left = (screen.width) ? (screen.width-Number(windowWidth))/2 : 0;
	top = (screen.height) ? (screen.height-Number(windowHeight))/2 : 0;

	windowFeatures = "width=1, height=1, left="+left+", top="+top+", resizable="+windowResizable+", menubar="+windowMenubar+", scrollbars="+windowScrollbars+", status="+windowStatus+", toolbar="+windowToolbars;	
	try{
	if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
		TSWindow = window.open('', '', windowFeatures);
		while(tsHeight < windowHeight || tsWidth < windowWidth ){
			tsWidth = (tsWidth < windowWidth ) ? tsWidth+increment : windowWidth;
			tsHeight = (tsHeight < windowHeight ) ? tsHeight+increment : windowHeight;
			TSWindow.resizeTo(tsWidth, tsHeight);
		}
		TSWindow.location = URL;
	}
	else
		TSWindow = window.open(URL, '', windowFeatures);
	}
	catch(err){
		TSWindow = window.open(URL, '', windowFeatures);	
		return;
	}	
	return;	
}
