if(typeof(Controls) == "undefined")
	var Controls = {};
if(typeof(Controls.WindowHelper) == "undefined"){
	Controls.WindowHelper = {};

	Controls.WindowHelper.Open = function(url, width, height, name, top, left, scroll, status, resizable, menubar){  
		var sName = Math.round(Math.random() * 999999999);	
		if(!name) name = 'WinOpen'+ sName.toString();
		if(!width) width = '670';
		if(!height) height = '450';
		status = (!status) ? 'no' : 'yes';
		scroll = (!scroll) ? 'no' : 'yes';
		resizable = (!resizable) ? 'no' : 'yes';
		menubar = (!menubar) ? 'no' : 'yes';
		if(!top) top = (screen.height-height) / 2 - 40;
		if(!left) left = (screen.width-width) / 2;
		properties = 'history=no, toolbar=0, location=0, directories=0, scrollbars='+scroll+', status='+status+', menubar='+menubar+', width='+width+', height='+height+', top='+top+', left='+left+', resizable='+resizable+'';	
		var sLocation = new String(window.location);	
		
		window.open(url, name, properties);
	}

	Controls.WindowHelper.SetAttribute = function(Name, Value){
		if(typeof(Window) != "undefined"){
			eval("Window.prototype." + Name +" = " + Value + ";");
		}else{
			eval("window." + Name +" = " + Value + ";");
		}
	}
}