function loadwindow(url, options){
	
	var title = "";
	var params ="";
	
	try{
		if(! options)
		var options = new Object();
		if(options){
			var _width = options.width ? options.width:600;
			var _height = options.height ? options.height:550;
			var _scrollbars = options.scrollbars ? options.scrollbars:1;
			var _resizable = options.resizable ? options.resizable:1;
			var _windowname = options.windowname ? options.windowname:'_loadwindow';
			var _left = options.left ? options.left: (screen.width/2  - _width/2);
			var _top = options.top ? options.top: (screen.height/2  - _height/2);
			var _autoFocus = options.focus ? true : false;			
			title = "";
			params = 'toolbar=0,scrollbars='+_scrollbars+',location=0,statusbar=0,menubar=0,resizable='+_resizable+',width='+_width+',height='+_height+',left='+_left+',top='+_top
	}
	}catch(e){
		alert(e);
	}
	try{
		var windowopener = window.open(url, title, params);
	}catch(e){
		alert("Oops, we could not open a new window. Are you using a popup blocker?");
	}
	
	if(! windowopener){
			alert("Oops, we could not open a new window. Are you using a popup blocker?");
	}	
	try{
		if (window.focus && _autoFocus) {
			windowopener.focus()
		}
	}catch(e){
		
	}
}
