/**
 * @author michaeld
 */
		AFL_JS.ViewController = new Object();

		AFL_JS.ViewController.AddRule = function(selector, declaration) {
	        // test for IE
	        var ua = navigator.userAgent.toLowerCase();
	        var isIE = (/msie/.test(ua)) && !(/opera/.test(ua)) && (/win/.test(ua));
	
	        // create the style node for all browsers
	        var style_node = document.createElement("style");
	        style_node.setAttribute("type", "text/css");
	        style_node.setAttribute("media", "screen"); 
	
	        // append a rule for good browsers
	        if (!isIE) style_node.appendChild(document.createTextNode(selector + " {" + declaration + "}"));
	
	        // append the style node
	        document.getElementsByTagName("head")[0].appendChild(style_node);
	
	        // use alternative methods for IE
	        if (isIE && document.styleSheets && document.styleSheets.length > 0) {
	                var last_style_node = document.styleSheets[document.styleSheets.length - 1];
	                if (typeof(last_style_node.addRule) == "object") last_style_node.addRule(selector, declaration);
	        }
		};
		
		AFL_JS.ViewController.GetLastRule = function() {
			var theRules = new Array();
			if (document.styleSheets[document.styleSheets.length - 1].cssRules)
				theRules = document.styleSheets[document.styleSheets.length - 1].cssRules
			else if (document.styleSheets[document.styleSheets.length - 1].rules)
				theRules = document.styleSheets[document.styleSheets.length - 1].rules
						
			return theRules[theRules.length-1];
		}
		
		AFL_JS.ViewController.HideParent = function(element) {
			element.parentNode.style.display = 'none';
		} 
		
		AFL_JS.ViewController.DragAndDrop = new Object();
		
		AFL_JS.ViewController.DragAndDrop.Storage = {
			Draggables : new Array()
		}
		
		AFL_JS.ViewController.DragAndDrop.RegisterDraggables = function(Draggables) {
			for(var a = 0; a < Draggables.length; a++) {
				AFL_JS.ViewController.DragAndDrop.Storage.Draggables.push(new Draggable(Draggables[a], {revert: true}));
			}
		}
		
		AFL_JS.ViewController.Confirm = function(str) {
			return confirm(str);
		}
		
		
