var _rules = {
	/*
	'div.cinel_layout div.element': function(el) {
		new Draggable(el, {starteffect: false, endeffect: false });
		Event.observe(el, 'mouseover', function() {
			el.bringToFront();
		});
	},
	*/
	'div.column': function(el) {
		gridManager.columns.push(el);
	},
	'div.element': function(el) {
		gridManager.elements.push(el);
	},
	'div.use_button_popup': function (el) {
		Event.observe(el, 'click', function() {
			
      alert('Om dit werkje te gebruiken, moet je eerst inloggen!\nHeb je nog geen login? Klik dan op: Maak je eigen cinekidstudio');
			//document.getElementById('l_username_id').focus();
			
      if($('loginslider').style.display == 'none'){
        new Effect.SlideDown($('loginslider'),{ duration: 0.7 });
      }
      setTimeout("document.lp_loginpad_form.l_username.focus()",700)
		});
	},
	'div#lastDiv': function(el) {
		gridManager.fixPositions();
	},
	'div.tvPlayer': function(el) {
		el.onclick = function() {
		
		var ah = screen.height-30;
		var aw = screen.width;

		var xc = ( aw - Cinelwidth ) / 2;
		var yc = ( ah - Cinelheight ) / 2;

		var newWin = window.open(el.id, "popup" + Math.round(Math.random() * 1000),'height=' + Cinelheight + ', width=' + Cinelwidth + ', left=' + xc + ', top=' + yc + ', screenX=' + xc + ', screenY' + yc + ', menubar=no, scrollbars=no, location=no, resizable=yes, status=no, titlebar=no');
		newWin.focus();return false;
		
		}
	},
	'div.click_div': function(el) {
		
		var a = el.down('a');
		el.onclick = function() {
			if (a.target) {
				var newWin = window.open(a.href, a.target);
				newWin.focus();
			} else {
				document.location.href = a.href;
			}
			return true;
		}

	},
	'a.wp': function(el) {
		el.onclick = function() {
			openStandardPopup(el, 960, 650);
			return false;
		}
	},
	'a.gv_om_popup': function(el) {
		el = $(el);
		el.onclick = function() {
			openStandardPopup(el, 800, 600);
			return false;
		}
	},
	'div.player_box div.player_display': function(el) {
		el.parentNode.style.width = (el.getWidth()) + 'px';
	},
	'div.player_box div.hor': function(el) {
		el.style.width = (el.parentNode.getWidth() - 22) + 'px';
		$(el).getElementsBySelector('img').shift().style.width = (el.parentNode.getWidth() - 22) + 'px';
	},
	'div.player_box div.ver': function(el) {
		el.style.height = (el.parentNode.getHeight() - 22) + 'px';
		$(el).getElementsBySelector('img').shift().style.height = (el.parentNode.getHeight() - 22) + 'px';
	}
};

Behaviour.register(_rules);


function conformation(){
		var response = confirm('weet u zeker dat deze pagina verwijderd kan worden');
	
		if(response){ 
			document.getElementById('delete').value = true;
		} 
}
