
	
$(document).ready(function() {
	$("#formOne").submit( function(e) {
		//e.preventDefault();
		if ($("#abs_file").val() == "") {
			alert ("Bisogna allegare l'abstract in formato word o rtf per inviare il form!");
			return false;
		} else {
			return true;
		}
	});
	if ($("textarea")) {
		setEditor();
	}
	$("#istruzioni").click( function(e) {
   		 e.preventDefault();
		 url = $(this).attr("href");
		 window.open(url,"Istruzioni","scrollbars=1,width=600,height=400,")
	});
	$("#abs_titolo___Frame, #abs_autori___Frame, #autori_inregola___Frame").attr("height",100);
});

setEditor = function(){
	thisPath = location.href.replace("http://","")
	thisPath = thisPath.substring(thisPath.indexOf("/"), thisPath.lastIndexOf("/"))
	var sBasePath = thisPath+"/admin/fckeditor/" ;
    var allTextAreas = document.getElementsByTagName("textarea");
    for (var i=0; i < allTextAreas.length; i++) {
      var ofckeditor = new FCKeditor( allTextAreas[i].name ) ;
      ofckeditor.BasePath = sBasePath ;
	  ofckeditor.ToolbarSet = "invioAbs" ;
      ofckeditor.ReplaceTextarea() ;
    }
}
