﻿function printplayer(id,width,height){
	document.write('<div id="'+id+'">Nu aveti flash player instalat</div>');
	var so = new SWFObject('media/player.swf', 'media', width, height, '7');
	so.addVariable('file', 'media.flv');
	so.addVariable('autostart', 'false');
	so.addVariable('skin', 'media/modieus.swf');
	so.write('media');
}

function popup(link){
window.open(link,"RRM student FM","status = 1, height =450, width = 350,top=0,right=0,resizable = 0");
}

$(function(){			
	function slideout(){
		setTimeout(function(){
			$("#response").slideUp("slow", function () {}); 
		}, 2000);
	} 

 	$("#response").hide();
	/*$("#tabeltop tr").sortable({ opacity: 0.8, cursor: 'move'});
	$("#tabeltop tbody").sortable({ opacity: 0.8, cursor: 'move'});
	$("#tabeltop tbody").disableSelection();*/
	$("#tabeltop").tableDnD({serializeRegexp: /[^\_]*$/});
	$('#topform').submit(function() {
		var action = $(this).attr('action'); 
		var order = $('#tabeltop').tableDnDSerialize() + '&update=update'; 
		/*alert(order);*/
		$.post(action,order, function(data){	
			$("#response").html(data);
			$("#response").slideDown('slow');
			slideout();
		});  	/**/
	return false;
	});
}); 



