function newwindow(id, size){
	var href = 'print/?id=' + id + '&' + 'size=' + size; 
	var window_name = 'print';
	var other_attr = 'width=600,height=500,resizable=yes,scrollbars=yes,location=yes,menubar=yes';
	
	window.open(href,window_name,other_attr);
}

Ext.onReady(function(){
										 
	Ext.select('ul#cm li a').on('mouseover', function(){
		//select all of the anchors
		//get the id of the one that is being hovered over
		//set indicator to show that subchannel belongs to the channel
		//based on that id radioClass the subchannel to display
		
		var el = Ext.get(this.id);
		var submenu_id = this.id + "_submenu"
		var submenu = Ext.get(submenu_id);
				
		if(submenu){
			submenu.radioClass('selected');
		}
	});
	
	var pb = Ext.get('print_button');
	if(pb){
		pb.on('mouseup', function(){
			var id_ref = Ext.get("id_ref").dom.innerHTML;
			var size = "3x5";
			newwindow(id_ref, size);
	 });
	}

	var pb1 = Ext.get('print_button1');
	if(pb1){
		pb1.on('mouseup', function(){
			var id_ref = Ext.get("id_ref").dom.innerHTML;
			var size = "4x6";
			newwindow(id_ref, size);
	 });
	}

	var pb2 = Ext.get('print_button2');
	if(pb2){
		pb2.on('mouseup', function(){
			var id_ref = Ext.get("id_ref").dom.innerHTML;
			var size = "8x11";
			newwindow(id_ref, size);
	 });
	}


});
